(function($){
'use strict';
if(typeof wpcf7==='undefined'||wpcf7===null){
return;
}
wpcf7=$.extend({
cached: 0,
inputs: []
}, wpcf7);
$(function(){
wpcf7.supportHtml5=(function(){
var features={};
var input=document.createElement('input');
features.placeholder='placeholder' in input;
var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ];
$.each(inputTypes, function(index, value){
input.setAttribute('type', value);
features[ value ]=input.type!=='text';
});
return features;
})();
$('div.wpcf7 > form').each(function(){
var $form=$(this);
wpcf7.initForm($form);
if(wpcf7.cached){
wpcf7.refill($form);
}});
});
wpcf7.getId=function(form){
return parseInt($('input[name="_wpcf7"]', form).val(), 10);
};
wpcf7.initForm=function(form){
var $form=$(form);
$form.submit(function(event){
if(! wpcf7.supportHtml5.placeholder){
$('[placeholder].placeheld', $form).each(function(i, n){
$(n).val('').removeClass('placeheld');
});
}
if(typeof window.FormData==='function'){
wpcf7.submit($form);
event.preventDefault();
}});
$('.wpcf7-submit', $form).after('');
wpcf7.toggleSubmit($form);
$form.on('click', '.wpcf7-acceptance', function(){
wpcf7.toggleSubmit($form);
});
$('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){
var name=$(this).attr('name');
$form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false);
});
$('.wpcf7-list-item.has-free-text', $form).each(function(){
var $freetext=$(':input.wpcf7-free-text', this);
var $wrap=$(this).closest('.wpcf7-form-control');
if($(':checkbox, :radio', this).is(':checked')){
$freetext.prop('disabled', false);
}else{
$freetext.prop('disabled', true);
}
$wrap.on('change', ':checkbox, :radio', function(){
var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio');
if($cb.is(':checked')){
$freetext.prop('disabled', false).focus();
}else{
$freetext.prop('disabled', true);
}});
});
if(! wpcf7.supportHtml5.placeholder){
$('[placeholder]', $form).each(function(){
$(this).val($(this).attr('placeholder'));
$(this).addClass('placeheld');
$(this).focus(function(){
if($(this).hasClass('placeheld')){
$(this).val('').removeClass('placeheld');
}});
$(this).blur(function(){
if(''===$(this).val()){
$(this).val($(this).attr('placeholder'));
$(this).addClass('placeheld');
}});
});
}
if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){
$form.find('input.wpcf7-date[type="date"]').each(function(){
$(this).datepicker({
dateFormat: 'yy-mm-dd',
minDate: new Date($(this).attr('min')),
maxDate: new Date($(this).attr('max'))
});
});
}
if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){
$form.find('input.wpcf7-number[type="number"]').each(function(){
$(this).spinner({
min: $(this).attr('min'),
max: $(this).attr('max'),
step: $(this).attr('step')
});
});
}
$('.wpcf7-character-count', $form).each(function(){
var $count=$(this);
var name=$count.attr('data-target-name');
var down=$count.hasClass('down');
var starting=parseInt($count.attr('data-starting-value'), 10);
var maximum=parseInt($count.attr('data-maximum-value'), 10);
var minimum=parseInt($count.attr('data-minimum-value'), 10);
var updateCount=function(target){
var $target=$(target);
var length=$target.val().length;
var count=down ? starting - length:length;
$count.attr('data-current-value', count);
$count.text(count);
if(maximum&&maximum < length){
$count.addClass('too-long');
}else{
$count.removeClass('too-long');
}
if(minimum&&length < minimum){
$count.addClass('too-short');
}else{
$count.removeClass('too-short');
}};
$(':input[name="' + name + '"]', $form).each(function(){
updateCount(this);
$(this).keyup(function(){
updateCount(this);
});
});
});
$form.on('change', '.wpcf7-validates-as-url', function(){
var val=$.trim($(this).val());
if(val
&& ! val.match(/^[a-z][a-z0-9.+-]*:/i)
&& -1!==val.indexOf('.')){
val=val.replace(/^\/+/, '');
val='http://' + val;
}
$(this).val(val);
});
};
wpcf7.submit=function(form){
if(typeof window.FormData!=='function'){
return;
}
var $form=$(form);
$('.ajax-loader', $form).addClass('is-active');
wpcf7.clearResponse($form);
var formData=new FormData($form.get(0));
var detail={
id: $form.closest('div.wpcf7').attr('id'),
status: 'init',
inputs: [],
formData: formData
};
$.each($form.serializeArray(), function(i, field){
if('_wpcf7'==field.name){
detail.contactFormId=field.value;
}else if('_wpcf7_version'==field.name){
detail.pluginVersion=field.value;
}else if('_wpcf7_locale'==field.name){
detail.contactFormLocale=field.value;
}else if('_wpcf7_unit_tag'==field.name){
detail.unitTag=field.value;
}else if('_wpcf7_container_post'==field.name){
detail.containerPostId=field.value;
}else if(field.name.match(/^_wpcf7_\w+_free_text_/)){
var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, '');
detail.inputs.push({
name: owner + '-free-text',
value: field.value
});
}else if(field.name.match(/^_/)){
}else{
detail.inputs.push(field);
}});
wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail);
var ajaxSuccess=function(data, status, xhr, $form){
detail.id=$(data.into).attr('id');
detail.status=data.status;
detail.apiResponse=data;
var $message=$('.wpcf7-response-output', $form);
switch(data.status){
case 'validation_failed':
$.each(data.invalidFields, function(i, n){
$(n.into, $form).each(function(){
wpcf7.notValidTip(this, n.message);
$('.wpcf7-form-control', this).addClass('wpcf7-not-valid');
$('[aria-invalid]', this).attr('aria-invalid', 'true');
});
});
$message.addClass('wpcf7-validation-errors');
$form.addClass('invalid');
wpcf7.triggerEvent(data.into, 'invalid', detail);
break;
case 'acceptance_missing':
$message.addClass('wpcf7-acceptance-missing');
$form.addClass('unaccepted');
wpcf7.triggerEvent(data.into, 'unaccepted', detail);
break;
case 'spam':
$message.addClass('wpcf7-spam-blocked');
$form.addClass('spam');
wpcf7.triggerEvent(data.into, 'spam', detail);
break;
case 'aborted':
$message.addClass('wpcf7-aborted');
$form.addClass('aborted');
wpcf7.triggerEvent(data.into, 'aborted', detail);
break;
case 'mail_sent':
$message.addClass('wpcf7-mail-sent-ok');
$form.addClass('sent');
wpcf7.triggerEvent(data.into, 'mailsent', detail);
break;
case 'mail_failed':
$message.addClass('wpcf7-mail-sent-ng');
$form.addClass('failed');
wpcf7.triggerEvent(data.into, 'mailfailed', detail);
break;
default:
var customStatusClass='custom-'
+ data.status.replace(/[^0-9a-z]+/i, '-');
$message.addClass('wpcf7-' + customStatusClass);
$form.addClass(customStatusClass);
}
wpcf7.refill($form, data);
wpcf7.triggerEvent(data.into, 'submit', detail);
if('mail_sent'==data.status){
$form.each(function(){
this.reset();
});
wpcf7.toggleSubmit($form);
}
if(! wpcf7.supportHtml5.placeholder){
$form.find('[placeholder].placeheld').each(function(i, n){
$(n).val($(n).attr('placeholder'));
});
}
$message.html('').append(data.message).slideDown('fast');
$message.attr('role', 'alert');
$('.screen-reader-response', $form.closest('.wpcf7')).each(function(){
var $response=$(this);
$response.html('').attr('role', '').append(data.message);
if(data.invalidFields){
var $invalids=$('
');
$.each(data.invalidFields, function(i, n){
if(n.idref){
var $li=$('').append($('').attr('href', '#' + n.idref).append(n.message));
}else{
var $li=$('').append(n.message);
}
$invalids.append($li);
});
$response.append($invalids);
}
$response.attr('role', 'alert').focus();
});
};
$.ajax({
type: 'POST',
url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'),
data: formData,
dataType: 'json',
processData: false,
contentType: false
}).done(function(data, status, xhr){
ajaxSuccess(data, status, xhr, $form);
$('.ajax-loader', $form).removeClass('is-active');
}).fail(function(xhr, status, error){
var $e=$('').text(error.message);
$form.after($e);
});
};
wpcf7.triggerEvent=function(target, name, detail){
var $target=$(target);
var event=new CustomEvent('wpcf7' + name, {
bubbles: true,
detail: detail
});
$target.get(0).dispatchEvent(event);
$target.trigger('wpcf7:' + name, detail);
$target.trigger(name + '.wpcf7', detail);
};
wpcf7.toggleSubmit=function(form, state){
var $form=$(form);
var $submit=$('input:submit', $form);
if(typeof state!=='undefined'){
$submit.prop('disabled', ! state);
return;
}
if($form.hasClass('wpcf7-acceptance-as-validation')){
return;
}
$submit.prop('disabled', false);
$('.wpcf7-acceptance', $form).each(function(){
var $span=$(this);
var $input=$('input:checkbox', $span);
if(! $span.hasClass('optional')){
if($span.hasClass('invert')&&$input.is(':checked')
|| ! $span.hasClass('invert')&&! $input.is(':checked')){
$submit.prop('disabled', true);
return false;
}}
});
};
wpcf7.notValidTip=function(target, message){
var $target=$(target);
$('.wpcf7-not-valid-tip', $target).remove();
$('')
.text(message).appendTo($target);
if($target.is('.use-floating-validation-tip *')){
var fadeOut=function(target){
$(target).not(':hidden').animate({
opacity: 0
}, 'fast', function(){
$(this).css({ 'z-index': -100 });
});
};
$target.on('mouseover', '.wpcf7-not-valid-tip', function(){
fadeOut(this);
});
$target.on('focus', ':input', function(){
fadeOut($('.wpcf7-not-valid-tip', $target));
});
}};
wpcf7.refill=function(form, data){
var $form=$(form);
var refillCaptcha=function($form, items){
$.each(items, function(i, n){
$form.find(':input[name="' + i + '"]').val('');
$form.find('img.wpcf7-captcha-' + i).attr('src', n);
var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);
$form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]);
});
};
var refillQuiz=function($form, items){
$.each(items, function(i, n){
$form.find(':input[name="' + i + '"]').val('');
$form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]);
$form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]);
});
};
if(typeof data==='undefined'){
$.ajax({
type: 'GET',
url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'),
beforeSend: function(xhr){
var nonce=$form.find(':input[name="_wpnonce"]').val();
if(nonce){
xhr.setRequestHeader('X-WP-Nonce', nonce);
}},
dataType: 'json'
}).done(function(data, status, xhr){
if(data.captcha){
refillCaptcha($form, data.captcha);
}
if(data.quiz){
refillQuiz($form, data.quiz);
}});
}else{
if(data.captcha){
refillCaptcha($form, data.captcha);
}
if(data.quiz){
refillQuiz($form, data.quiz);
}}
};
wpcf7.clearResponse=function(form){
var $form=$(form);
$form.removeClass('invalid spam sent failed');
$form.siblings('.screen-reader-response').html('').attr('role', '');
$('.wpcf7-not-valid-tip', $form).remove();
$('[aria-invalid]', $form).attr('aria-invalid', 'false');
$('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid');
$('.wpcf7-response-output', $form)
.hide().empty().removeAttr('role')
.removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked');
};
wpcf7.apiSettings.getRoute=function(path){
var url=wpcf7.apiSettings.root;
url=url.replace(wpcf7.apiSettings.namespace,
wpcf7.apiSettings.namespace + path);
return url;
};})(jQuery);
(function (){
if(typeof window.CustomEvent==="function") return false;
function CustomEvent(event, params){
params=params||{ bubbles: false, cancelable: false, detail: undefined };
var evt=document.createEvent('CustomEvent');
evt.initCustomEvent(event,
params.bubbles, params.cancelable, params.detail);
return evt;
}
CustomEvent.prototype=window.Event.prototype;
window.CustomEvent=CustomEvent;
})();
var cff_js_exists=(typeof cff_js_exists!=='undefined') ? true:false;
if(!cff_js_exists){
function cff_init(){
jQuery('.cff-likebox iframe').each(function(){
var $likebox=jQuery(this),
likeboxWidth=$likebox.attr('data-likebox-width'),
cffFeedWidth=$likebox.parent().width();
if(likeboxWidth=='') likeboxWidth=340;
if(cffFeedWidth < likeboxWidth) likeboxWidth=cffFeedWidth;
$likebox.attr('src', 'https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F'+$likebox.attr('data-likebox-id')+'%2F&tabs&width='+likeboxWidth+'&small_header='+$likebox.attr('data-likebox-header')+'&adapt_container_width=true&hide_cover='+$likebox.attr('data-hide-cover')+'&hide_cta='+$likebox.attr('data-hide-cta')+'&show_facepile='+$likebox.attr('data-likebox-faces')+'&locale='+$likebox.attr('data-locale'));
});
jQuery('#cff .cff-item').each(function(){
var $self=jQuery(this);
if($self.find('.cff-viewpost-facebook').parent('p').length){
$self.find('.cff-viewpost-facebook').unwrap('p');
}
if($self.find('.cff-author').parent('p').length){
$self.find('.cff-author').eq(1).unwrap('p');
$self.find('.cff-author').eq(1).remove();
}
if($self.find('#cff .cff-link').parent('p').length){
$self.find('#cff .cff-link').unwrap('p');
}
var expanded=false,
$post_text=$self.find('.cff-post-text .cff-text'),
text_limit=$self.closest('#cff').attr('data-char');
if(typeof text_limit==='undefined'||text_limit=='') text_limit=99999;
if($post_text.find('a.cff-post-text-link').length) $post_text=$self.find('.cff-post-text .cff-text a');
var full_text=$post_text.html();
if(full_text==undefined) full_text='';
var cff_trunc_regx=new RegExp(/(<[^>]*>)/g);
var cff_trunc_counter=0;
full_text_arr=full_text.split(cff_trunc_regx);
for (var i=0, len=full_text_arr.length; i < len; i++){
if(!(cff_trunc_regx.test(full_text_arr[i]))){
if(cff_trunc_counter==text_limit){
full_text_arr.splice(i, 1);
continue;
}
cff_trunc_counter=cff_trunc_counter + full_text_arr[i].length;
if(cff_trunc_counter > text_limit){
var diff=cff_trunc_counter - text_limit;
full_text_arr[i]=full_text_arr[i].slice(0, -diff);
cff_trunc_counter=text_limit;
if(full_text.length > text_limit) $self.find('.cff-expand').show();
}}
}
var short_text=full_text_arr.join('');
short_text=short_text.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g, "");
var lastChar=short_text.substr(short_text.length - 1);
if(lastChar=='<') short_text=short_text.substring(0, short_text.length - 1);
short_text=short_text.replace(/(
\s*)+$/,'');
short_text=short_text.replace(/(\s*)+$/,'');
$post_text.html(short_text);
$self.find('.cff-expand a').unbind('click').bind('click', function(e){
e.preventDefault();
var $expand=jQuery(this),
$more=$expand.find('.cff-more'),
$less=$expand.find('.cff-less');
if(expanded==false){
$post_text.html(full_text);
expanded=true;
$more.hide();
$less.show();
}else{
$post_text.html(short_text);
expanded=false;
$more.show();
$less.hide();
}
cffLinkHashtags();
$post_text.find('a').attr('target', '_blank');
});
$post_text.find('a').add($self.find('.cff-post-desc a')).attr({
'target':'_blank',
'rel':'nofollow'
});
$sharedLink=$self.find('.cff-shared-link');
if($sharedLink.text()==''){
$sharedLink.remove();
}
function cffLinkHashtags(){
var cffTextStr=$self.find('.cff-text').html(),
cffDescStr=$self.find('.cff-post-desc').html(),
regex=/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi,
linkcolor=$self.find('.cff-text').attr('data-color');
function replacer(hash){
var replacementString=jQuery.trim(hash);
if(/^#[0-9A-F]{6}$/i.test(replacementString)){
return replacementString;
}else{
return ' ' + replacementString + '';
}}
if(typeof cfflinkhashtags=='undefined') cfflinkhashtags='true';
if(cfflinkhashtags=='true'){
var $cffText=$self.find('.cff-text');
if($cffText.length > 0){
cffTextStr=cffTextStr.replace(/
/g, "
");
$cffText.html(cffTextStr.replace(regex , replacer));
}}
if($self.find('.cff-post-desc').length > 0) $self.find('.cff-post-desc').html(cffDescStr.replace(regex , replacer));
}
cffLinkHashtags();
$self.find('.cff-text a').add($self.find('.cff-post-desc a')).attr({
'target':'_blank',
'rel':'nofollow'
});
$self.find('.cff-share-link').unbind().bind('click', function(){
var $cffShareTooltip=$self.find('.cff-share-tooltip')
if($cffShareTooltip.is(':visible')){
$cffShareTooltip.hide().find('a').removeClass('cff-show');
}else{
$cffShareTooltip.show();
var time=0;
$cffShareTooltip.find('a').each(function(){
var $cffShareIcon=jQuery(this);
setTimeout(function(){
$cffShareIcon.addClass('cff-show');
}, time);
time +=20;
});
}});
});
}
cff_init();
};
jQuery(document).ready(function(){
wpcf7_redirect_mailsent_handler();
});
function wpcf7_redirect_mailsent_handler(){
document.addEventListener('wpcf7mailsent', function(event){
form=wpcf7_redirect_forms [ event.detail.contactFormId ];
if(form.after_sent_script){
form.after_sent_script=htmlspecialchars_decode(form.after_sent_script);
eval(form.after_sent_script);
}
if(form.use_external_url&&form.external_url){
redirect_url=form.external_url;
}else{
redirect_url=form.thankyou_page_url;
}
if(form.http_build_query){
http_query=jQuery.param(event.detail.inputs, true);
redirect_url=redirect_url + '?' + http_query;
}else if(form.http_build_query_selectively){
http_query='?';
selective_fields=form.http_build_query_selectively_fields.split(' ').join('');
event.detail.inputs.forEach(function(element, index){
if(selective_fields.indexOf(element.name)!=-1){
http_query +=element.name + '=' + element.value + '&';
}});
http_query=http_query.slice(0, -1);
redirect_url=redirect_url + http_query;
}
if(redirect_url){
if(! form.open_in_new_tab){
console.log(form);
if(form.delay_redirect){
setTimeout(function(){
location.href=redirect_url;
}, form.delay_redirect);
}else{
location.href=redirect_url;
}}else{
if(form.delay_redirect){
setTimeout(function(){
window.open(redirect_url);
}, form.delay_redirect);
}else{
window.open(redirect_url);
}}
}}, false);
}
function htmlspecialchars_decode(string){
var map={
'&': '&',
'&': "&",
'<': '<',
'>': '>',
'"': '"',
''': "'",
'’': "’",
'‘': "‘",
'–': "–",
'—': "—",
'…': "…",
'”': '”'
};
return string.replace(/\&[\w\d\#]{2,5}\;/g, function(m){ return map[m]; });
};
window.addComment=function(u){var p,v,f,y=u.document,I={commentReplyClass:"comment-reply-link",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=u.MutationObserver||u.WebKitMutationObserver||u.MozMutationObserver,o="querySelector"in y&&"addEventListener"in u,n=!!y.documentElement.dataset;function t(){r(),e&&new e(d).observe(y.body,{childList:!0,subTree:!0})}function r(e){if(o&&(p=h(I.cancelReplyId),v=h(I.commentFormId),p)){p.addEventListener("touchstart",i),p.addEventListener("click",i);for(var t,n=function(e){var t=I.commentReplyClass;e&&e.childNodes||(e=y);t=y.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return t}(e),r=0,d=n.length;r #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*[\/]/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b').insertAfter($el);
var $text=$('').appendTo($comboWrap);
var $button=$('').appendTo($comboWrap);
$el.appendTo($comboWrap);
$el.change(function(){
$text.text($('option:selected', $el).text());
});
$text.text($('option:selected', $el).text());
$el.comboWrap=$comboWrap;
});
}})(jQuery);
(function($){
$.fn.checkbox=function(){
$(this).each(function(){
var $el=$(this);
var typeClass=$el.attr('type');
$el.hide();
$el.next('.'+typeClass+'-sign').remove();
var $checkbox=$('').insertAfter($el);
$checkbox.click(function(){
if($el.attr('type')=='radio'){
$el.prop('checked', true).trigger('change').trigger('click');
}else{
$el.prop('checked', !($el.is(':checked'))).trigger('change');
}});
$el.change(function(){
console.log($el);
$('input[name="'+$el.attr('name')+'"]').each(function(){
if($(this).is(':checked')){
$(this).next('.'+$(this).attr('type')+'-sign').addClass('checked');
}else{
$(this).next('.'+$(this).attr('type')+'-sign').removeClass('checked');
}});
});
if($el.is(':checked')){
$checkbox.addClass('checked');
}else{
$checkbox.removeClass('checked');
}});
}})(jQuery);
jQuery.easing['jswing']=jQuery.easing['swing'];
jQuery.extend(jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d){
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d){
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d){
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d){
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d){
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d){
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d){
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d){
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d){
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d){
return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d){
return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d){
if(t==0) return b;
if(t==d) return b+c;
if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d){
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d){
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d){
if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
},
easeOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b;
},
easeInOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d/2)==2) return b+c; if(!p) p=d*(.3*1.5);
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d){
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d){
if((t/=d) < (1/2.75)){
return c*(7.5625*t*t) + b;
}else if(t < (2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
}else if(t < (2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
}else{
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}},
easeInOutBounce: function (x, t, b, c, d){
if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}});
;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.cssanimations=function(){return F("animationName")},q.csstransitions=function(){return F("transition")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,e.prefixed=function(a,b,c){return b?F(a,b,c):F(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f' + this.options.backLabel + '');
this.$back=this.$menu.find('li.dl-back');
if(this.options.useActiveItemAsBackLabel){
this.$back.each(function(){
var $this=$(this),
parentLabel=$this.parents('li:first').find('a:first').text();
$this.find('a').html(parentLabel);
});
}
if(this.options.useActiveItemAsLink){
this.$el.find('ul.dl-submenu').prepend(function(){
var activeLi=$(this).parents('li:not(.dl-back):first');
var parentli=activeLi.find('a:first');
if(activeLi.hasClass('mobile-clickable'))
return '' + self.options.showCurrentLabel + '';
else
return '';
});
}},
_initEvents:function(){
var self=this;
this.$trigger.on('click.dlmenu', function(){
if(self.open){
self._closeMenu();
}else{
self._openMenu();
$body.off('click').children().on('click.dlmenu', function(){
self._closeMenu() ;
});
}
return false;
});
this.$menuitems.on('click.dlmenu', function(event){
event.stopPropagation();
var $item=$(this),
$submenu=$item.children('ul.dl-submenu');
if(($submenu.length > 0)&&!($(event.currentTarget).hasClass('dl-subviewopen'))){
var $flyin=$submenu.clone().css('opacity', 0).insertAfter(self.$menu),
onAnimationEndFn=function(){
self.$menu.off(self.animEndEventName).removeClass(self.options.animationClasses.classout).addClass('dl-subview');
$item.addClass('dl-subviewopen').parents('.dl-subviewopen:first').removeClass('dl-subviewopen').addClass('dl-subview');
$flyin.remove();
};
setTimeout(function(){
$flyin.addClass(self.options.animationClasses.classin);
self.$menu.addClass(self.options.animationClasses.classout);
if(self.supportAnimations){
self.$menu.on(self.animEndEventName, onAnimationEndFn);
}else{
onAnimationEndFn.call();
}
self.options.onLevelClick($item, $item.children('a:first').text());
});
return false;
}else{
self.options.onLinkClick($item, event);
}});
this.$back.on('click.dlmenu', function(event){
var $this=$(this),
$submenu=$this.parents('ul.dl-submenu:first'),
$item=$submenu.parent(),
$flyin=$submenu.clone().insertAfter(self.$menu);
var onAnimationEndFn=function(){
self.$menu.off(self.animEndEventName).removeClass(self.options.animationClasses.classin);
$flyin.remove();
};
setTimeout(function(){
$flyin.addClass(self.options.animationClasses.classout);
self.$menu.addClass(self.options.animationClasses.classin);
if(self.supportAnimations){
self.$menu.on(self.animEndEventName, onAnimationEndFn);
}else{
onAnimationEndFn.call();
}
$item.removeClass('dl-subviewopen');
var $subview=$this.parents('.dl-subview:first');
if($subview.is('li')){
$subview.addClass('dl-subviewopen');
}
$subview.removeClass('dl-subview');
});
return false;
});
},
closeMenu:function(){
if(this.open){
this._closeMenu();
}},
_closeMenu:function(){
var self=this,
onTransitionEndFn=function(){
self.$menu.off(self.transEndEventName);
self._resetMenu();
};
this.$menu.removeClass('dl-menuopen');
this.$menu.addClass('dl-menu-toggle');
this.$trigger.removeClass('dl-active');
if(this.supportTransitions){
this.$menu.on(this.transEndEventName, onTransitionEndFn);
}else{
onTransitionEndFn.call();
}
this.open=false;
},
openMenu:function(){
if(!this.open){
this._openMenu();
}},
_openMenu:function(){
var self=this;
$body.off('click').on('click.dlmenu', function(){
self._closeMenu() ;
});
this.$menu.addClass('dl-menuopen dl-menu-toggle').on(this.transEndEventName, function(){
$(this).removeClass('dl-menu-toggle');
});
this.$trigger.addClass('dl-active');
this.open=true;
},
_resetMenu:function(){
this.$menu.removeClass('dl-subview');
this.$menuitems.removeClass('dl-subview dl-subviewopen');
}};
var logError=function(message){
if(window.console){
window.console.error(message);
}};
$.fn.dlmenu=function(options){
if(typeof options==='string'){
var args=Array.prototype.slice.call(arguments, 1);
this.each(function(){
var instance=$.data(this, 'dlmenu');
if(!instance){
logError("cannot call methods on dlmenu prior to initialization; " +
"attempted to call method '" + options + "'");
return;
}
if(!$.isFunction(instance[options])||options.charAt(0)==="_"){
logError("no such method '" + options + "' for dlmenu instance");
return;
}
instance[ options ].apply(instance, args);
});
}else{
this.each(function(){
var instance=$.data(this, 'dlmenu');
if(instance){
instance._init();
}else{
instance=$.data(this, 'dlmenu', new $.DLMenu(options, this));
}});
}
return this;
};})(jQuery, window);
(function($){
$(function(){
$('.site-title a .logo-2x, .site-title a .logo-3x').each(function(){
var $logo=$(this);
$('img', $logo).each(function(){
var $img=$(this);
if($img.get(0).complete){
$img.width(parseInt($img.width()/($logo.hasClass('logo-2x') ? 2:3)));
$img.css({ visibility:'visible' });
setMargin($img.parent().find('img.default'));
}else{
$img.load(function(){
$img.width(parseInt($img.width()/2));
$img.css({ visibility:'visible' });
setMargin($img.parent().find('img.default'));
});
}});
});
$('.site-title h1 .logo:visible img').load(function(){
$('.site-title a .logo:visible img.small').show();
$(this).closest('.site-title .logo:visible').width(Math.max($('.site-title a .logo:visible img.default').width(), $('.site-title a .logo:visible img.small').width()));
});
});
function setMargin(img){
var w=$(img).width();
$(img).siblings('img.small').show();
if($(img).closest('.header-main.logo-position-right').length){
w=$(img).siblings('img.small').width();
}
if($(img).closest('.header-main.logo-position-center').length){
w=$(img).siblings('img.small').width() + ($(img).width() - $(img).siblings('img.small').width()) / 2;
$(img).siblings('img.small').css('margin-right', ($(img).width() - $(img).siblings('img.small').width()) / 2 + 'px');
}
$(img).siblings('img.small').css('margin-left', '-' + w + 'px');
}
function HeaderAnimation(el, options){
this.el=el;
this.$el=$(el);
this.options={
startTop: 100
};
$.extend(this.options, options);
this.initialize();
}
HeaderAnimation.prototype={
initialize: function(){
var self=this;
this.hasAnimation=false;
this.originalMenuLinkPaddingTop='';
this.originalMenuLinkPaddingBottom='';
this.supportTransition=Modernizr.csstransitions;
this.$el.wrap('');
this.$wrapper=$('#site-header-wrapper');
this.initializeHeight();
if(this.$el.hasClass('header-on-slideshow')&&$('#main-content > *').first().is('.sc-slideshow, .block-slideshow')){
this.$wrapper.addClass('header-on-slideshow');
}else{
this.$el.removeClass('header-on-slideshow');
}
if($('.page-title-block .sc-video-background').length&&$('.page-title-block .sc-video-background').data('headerup')){
this.$el.addClass('header-on-slideshow');
this.$wrapper.addClass('header-on-slideshow');
}
this.initializeStyles();
this.updateTopOffset();
if($('#top-area').size() > 0)
this.options.startTop=$('#top-area').outerHeight();
$(window).scroll(function(){
self.scrollHandler();
});
$(window).resize(function(){
self.scrollHandler();
setTimeout(function(){
self.initializeHeight();
}, 350);
});
$(document).ready(function(){
self.scrollHandler();
});
},
initializeStyles: function(){
var self=this;
if($('.site-title a .logo:visible img.default', this.$el).size() > 0&&$('.site-title a .logo:visible img.default', this.$el)[0].complete){
setMargin($('.site-title a .logo:visible img.default', this.$el));
self.initializeHeight();
}else{
$('.site-title a .logo:visible img.default', this.$el).on('load error', function(){
setMargin(this);
self.initializeHeight();
});
}},
initializeHeight: function(){
var shrink=this.$el.hasClass('shrink');
var fixed=this.$el.hasClass('fixed');
this.$el.removeClass('shrink fixed');
this.updateTopOffset();
if($('.page-title-block .sc-video-background').length&&$('.page-title-block .sc-video-background').data('headerup')){
$('.page-title-block').css('paddingTop', '');
$('.page-title-block').css({
paddingTop: parseInt($('.page-title-block').css('paddingTop')) + this.$el.outerHeight() + 'px'
});
}
if($('#primary-navigation .menu-toggle').is(':visible'))
return false;
this.$wrapper.height(this.$el.outerHeight());
if(shrink){
this.$el.addClass('shrink');
}
if(fixed){
this.$el.addClass('fixed');
}},
updateTopOffset: function(){
var offset=parseInt($('html').css('margin-top'));
if(this.$wrapper.hasClass('header-on-slideshow')&&!this.$el.hasClass('fixed'))
offset=0;
var scroll=getScrollY();
if($('#top-area').size() > 0&&$('#top-area').is(':visible')){
var top_area_height=$('#top-area').outerHeight();
if(scroll < top_area_height)
offset +=top_area_height - scroll;
}
this.$el.css('top', offset + 'px');
},
firstShrink: function(){
this.$el.parent().css({
position: 'static'
});
if(this.$el.hasClass('header-on-slideshow')&&$('#main-content > *').first().is('.sc-slideshow, .block-slideshow')){
this.$wrapper.css({position: 'absolute'});
}
this.$el.addClass('fixed');
},
scrollHandler: function(){
if(this.hasAnimation)
return false;
if($('#primary-navigation .menu-toggle').is(':visible'))
return false;
this.updateTopOffset();
var scroll=getScrollY();
if(scroll >=this.options.startTop){
if(!this.$el.hasClass('shrink')){
this.firstShrink();
this.shrink();
}}else{
if(this.$el.hasClass('shrink')){
this.expand ();
}}
},
expand: function(){
var self=this;
this.hasAnimation=true;
this.$el.removeClass('shrink')
if(!this.supportTransition){
if(this.originalMenuLinkPaddingTop||this.originalMenuLinkPaddingBottom)
$('#primary-menu > li > a').animate({
paddingTop: this.originalMenuLinkPaddingTop,
paddingBottom: this.originalMenuLinkPaddingBottom
}, 300, function(){
self.hasAnimation=false;
});
}else{
this.hasAnimation=false;
}},
shrink: function(){
var self=this;
this.hasAnimation=true;
this.$el.addClass('shrink');
if(!this.supportTransition){
this.originalMenuLinkPaddingTop=$('#primary-menu > li > a:first').css('padding-top');
this.originalMenuLinkPaddingBottom=$('#primary-menu > li > a:first').css('padding-top');
$('#primary-menu > li > a').animate({
paddingTop: '28px',
paddingBottom: '28px'
}, 300, function (){
self.hasAnimation=false;
});
}else{
this.hasAnimation=false;
}}
};
function getScrollY(elem){
return window.pageYOffset||document.documentElement.scrollTop;
};
$.fn.headerAnimation=function(options){
options=options||{};
return new HeaderAnimation(this.get(0), options);
}})(jQuery);
(function ($){
var lazy_effects={
'clip': {
show: function(element){
$(element.el).animate({
transform: 'scale(1.1)',
},
{
duration:200,
}).animate({
transform: 'scale(1)',
},
{
duration:200,
complete: function(){
if(element.options.queueType=='sync')
element.finishAnimation();
}})
}},
'fading': {
show: function(element){
$(element.el).css({
opacity: 0
}).animate({
opacity: 1
},
{
duration:400,
complete: function(){
if(element.options.queueType=='sync')
element.finishAnimation();
}});
}},
'drop-right': {
show: function(element){
var left=parseInt($(element.el).width()/15);
$(element.el).wrapInner('').css({
opacity: 1
});
$(element.el).find('> div').css({
opacity: 0
}).animate({
opacity: 1,
left: 0,
},
{
duration:700,
complete: function(){
var $div=$(element.el).find('> div');
$(element.el).append($div.find('> *'));
$div.remove();
if(element.options.queueType=='sync')
element.finishAnimation();
}});
}},
'drop-right-without-wrap': {
show: function(element){
var left=parseInt($(element.el).width()/15);
$(element.el).css({
opacity: 0,
position: 'relative',
left: left
}).animate({
opacity: 1,
left: 0,
},
{
duration:700,
complete: function(){
if(element.options.queueType=='sync')
element.finishAnimation();
}});
}},
'drop-right-unwrap': {
show: function(element){
var left=parseInt($(element.el).width()/15);
$(element.el).wrapInner('').css({
opacity: 1
});
$(element.el).find('> div').css({
opacity: 0
}).animate({
opacity: 1,
left: 0,
},
{
duration:700,
complete: function(){
if(element.options.queueType=='sync')
element.finishAnimation();
}});
}},
'drop-left': {
show: function(element){
var right=parseInt($(element.el).width()/15);
$(element.el).wrapInner('').css({
opacity: 1
});
$(element.el).find('> div').css({
opacity: 0
}).animate({
opacity: 1,
right: 0
},
{
duration:700,
complete: function(){
$(element.el).html($(element.el).find('> div').html());
if(element.options.queueType=='sync')
element.finishAnimation();
}});
}},
'drop-bottom': {
show: function(element){
var top=parseInt($(element.el).height()/15);
$(element.el).wrapInner('').css({
opacity: 1
});
$(element.el).find('> div').css({
opacity: 0
}).animate({
opacity: 1,
top: 0
},
{
duration:700,
complete: function(){
var $div=$(element.el).find('> div');
$(element.el).append($div.find('> *'));
$div.remove();
if(element.options.queueType=='sync')
element.finishAnimation();
}});
}},
'drop-top': {
show: function(element){
var step=$(element.el).data('ll-step')||0.07;
step=parseFloat(step);
var bottom=parseInt($(element.el).height() * step);
$(element.el).wrapInner('').css({
opacity: 1
});
$(element.el).find('> div').css({
opacity: 0
}).animate({
opacity: 1,
bottom: 0
},
{
duration:700,
complete: function(){
$(element.el).html($(element.el).find('> div').html());
if(element.options.queueType=='sync')
element.finishAnimation();
}});
}},
'slide-right': {
show: function(element){
if(element.options.firstGroupElement)
$(element.el).parent().css({
overflow: 'hidden'
});
$(element.el).css({
opacity: 0,
position: 'relative',
left: '100%'
}).animate({left: 0, opacity: 1}, 100).animate({left: -15}, 100).animate({left: 0}, 100, function(){
if(element.options.lastGroupElement)
$(element.el).parent().css({
overflow: 'visible'
});
if(element.options.queueType=='sync')
element.finishAnimation();
});
}},
'action': {
show: function(element){
var func=$(element.el).data('ll-action-func')||'';
if(!func||window[func]==null||window[func]==undefined)
return;
window[func](element.el);
}},
};
function Element(el, options){
this.el=el;
this.options={
offset: 1,
delay: -1,
};
$.extend(this.options, options);
if(this.options['delay']==undefined||this.options['delay']==null)
this.options['delay']=-1;
this.options.queueType=this.options.delay==-1 ? 'sync': 'async';
}
function Group(el, options){
this.el=el;
this.queue=new Queue(this);
this.options={
offset: 0.7,
delay: -1,
queueType: 'sync',
isFirst: false,
force: false,
firstGroupElement: false,
lastGroupElement: false
};
$.extend(this.options, options);
if(this.options['itemDelay']==undefined||this.options['itemDelay']==null)
this.options['itemDelay']=-1;
this.options.itemQueueType=this.options.itemDelay==-1 ? 'sync': 'async';
this.options['finishDelay']=this.options['finishDelay']||300;
}
function Queue(obj){
this.object=obj;
this.queue=[];
this.is_exec=false;
}
function LazyLoading(options){
this.options={
};
$.extend(this.options, options);
this.initialize();
}
$.fn.reverse=[].reverse;
String.prototype.startsWith=function (str){
return this.indexOf(str)==0;
};
$.lazyLoading=function(options){
return new LazyLoading(options);
}
var ua=navigator.userAgent.toLowerCase(),
platform=navigator.platform.toLowerCase(),
UA=ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null, 'unknown', 0],
mode=UA[1]=='ie'&&document.documentMode;
var Browser={
name: (UA[1]=='version') ? UA[3]:UA[1],
Platform: {
name: ua.match(/ip(?:ad|od|hone)/) ? 'ios':(ua.match(/(?:webos|android)/)||platform.match(/mac|win|linux/)||['other'])[0]
},
};
function getOffset(elem){
if(elem.getBoundingClientRect&&Browser.Platform.name!='ios'){
var bound=elem.getBoundingClientRect(),
html=elem.ownerDocument.documentElement,
htmlScroll=getScroll(html),
elemScrolls=getScrolls(elem),
isFixed=(styleString(elem, 'position')=='fixed');
return {
x: parseInt(bound.left) + elemScrolls.x + ((isFixed) ? 0:htmlScroll.x) - html.clientLeft,
y: parseInt(bound.top) + elemScrolls.y + ((isFixed) ? 0:htmlScroll.y) - html.clientTop
};}
var element=elem, position={x: 0, y: 0};
if(isBody(elem)) return position;
while (element&&!isBody(element)){
position.x +=element.offsetLeft;
position.y +=element.offsetTop;
if(Browser.name=='firefox'){
if(!borderBox(element)){
position.x +=leftBorder(element);
position.y +=topBorder(element);
}
var parent=element.parentNode;
if(parent&&styleString(parent, 'overflow')!='visible'){
position.x +=leftBorder(parent);
position.y +=topBorder(parent);
}}else if(element!=elem&&Browser.name=='safari'){
position.x +=leftBorder(element);
position.y +=topBorder(element);
}
element=element.offsetParent;
}
if(Browser.name=='firefox'&&!borderBox(elem)){
position.x -=leftBorder(elem);
position.y -=topBorder(elem);
}
return position;
};
function getScroll(elem){
return {x: window.pageXOffset||document.documentElement.scrollLeft, y: window.pageYOffset||document.documentElement.scrollTop};};
function getScrolls(elem){
var element=elem.parentNode, position={x: 0, y: 0};
while (element&&!isBody(element)){
position.x +=element.scrollLeft;
position.y +=element.scrollTop;
element=element.parentNode;
}
return position;
};
function styleString(element, style){
return $(element).css(style);
};
function styleNumber(element, style){
return parseInt(styleString(element, style))||0;
};
function borderBox(element){
return styleString(element, '-moz-box-sizing')=='border-box';
};
function topBorder(element){
return styleNumber(element, 'border-top-width');
};
function leftBorder(element){
return styleNumber(element, 'border-left-width');
};
function isBody(element){
return (/^(?:body|html)$/i).test(element.tagName);
};
LazyLoading.prototype={
initialize: function(){
this.animated=false;
this.groups=[];
this.queue=new Queue(this);
this.init=true;
this.hasHeaderVisuals=$('.ls-wp-container').size() > 0;
$(document).find('.lazy-loading:first').addClass('lazy-loading-first');
$(document).find('.lazy-loading').not('.lazy-loading-not-hide').css({visibility: 'hidden'});
$(document).ready(function(){
self.rebuild();
$(window).resize(function(){
if(self.resizeTimeout){
clearTimeout(self.resizeTimeout);
}
self.rebuild();
});
});
var self=this;
$(window).scroll(function(){
if(!self.animated){
if(self.init)
self.buildList();
self.init=false;
setTimeout(function(){
self.scrollPageHandler();
}, 100);
self.animated=true;
}});
$(window).on('lazy-loading-start', function(){
self.rebuild();
});
},
rebuild: function(){
this.buildList();
this.scrollPageHandler();
},
scrollPageHandler: function(){
var self=this;
var new_elements=[];
var window_bottom=$(window).scrollTop() + $(window).height();
$.each(this.groups, function(index, group){
if(group.is_visible(window_bottom)){
group.show();
}else{
new_elements.push(group);
}});
this.queue.next();
this.groups=new_elements;
this.animated=false;
},
buildList: function(){
var self=this;
this.groups=[];
$(document).find('.lazy-loading').not('.lazy-loading-showed').each(function(){
var group=new Group(this, {
offset: $(this).data('ll-offset')||0.7,
lazyLoading: self,
itemDelay: $(this).data('ll-item-delay'),
isFirst: self.hasHeaderVisuals&&$(this).hasClass('lazy-loading-first'),
finishDelay: $(this).data('ll-finish-delay'),
force: $(this).data('ll-force-start')!=undefined&&$(this).data('ll-force-start')!=null
});
var elements=[];
$(this).find('.lazy-loading-item').not('.lazy-loading-showed').each(function(){
var effect=self.getEffect(this);
if(effect==''){
$(this).css({
opacity: 1
});
return;
}
var el_delay=group.options.itemDelay;
var element_delay=$(this).data('ll-item-delay');
if(element_delay!=null&&element_delay!=undefined){
el_delay=element_delay;
}
element=new Element(this, {
effect: effect,
group: group,
delay: el_delay,
});
elements.push(element);
});
if(elements.length > 0){
group.setElements(elements);
self.groups.push(group);
}});
},
getEffect: function(element){
return $(element).data('ll-effect')||'';
},
finishAnimation: function(){
}};
Group.prototype={
is_visible: function(window_bottom){
if(this.options.force)
return true;
var position=getOffset(this.el);
if((position.y + parseFloat(this.options.offset) * this.el.offsetHeight) <=window_bottom){
return true;
}
else
return false;
},
show: function(){
this.options.lazyLoading.queue.add(this);
$(this.el).addClass('lazy-loading-showed');
},
setElements: function(elements){
this.elements=elements;
},
startAnimation: function(){
var self=this;
$(this.el).css({visibility: 'visible'});
$.each(this.elements, function(index, element){
if(self.elements[index].options.effect!='action')
if(self.elements[index].options.effect!='clip')
$(self.elements[index].el).css({
opacity: 0
});
else
$(self.elements[index].el).css({
position: 'relative',
transform: 'scale(0)'
});
if(index==0)
self.elements[index].options.firstGroupElement=true;
if(index==self.elements.length - 1){
self.elements[index].options.lastGroupElement=true;
self.elements[index].options.queueType='sync';
}
self.elements[index].show();
});
if(this.options.isFirst){
setTimeout(function(){
self.queue.next();
}, 500);
}else{
this.queue.next();
}
setTimeout(function(){
self.finishAnimation();
}, this.options.finishDelay);
},
finishAnimation: function(){
this.options.lazyLoading.queue.finishPosition();
}};
Element.prototype={
is_visible: function(window_bottom){
var lazy_effect=lazy_effects[this.options.effect]||{};
var offset=lazy_effect['offset']||this.options.offset;
var position=getOffset(this.el);
if((position.y + offset * this.el.offsetHeight) <=window_bottom)
return true;
else
return false;
},
show: function(){
this.options.group.queue.add(this);
$(this.el).addClass('lazy-loading-showed');
},
startAnimation: function(){
var self=this;
var lazy_effect=lazy_effects[this.options.effect]||{};
var func=lazy_effect['show']||function(){};
func(this);
if(this.options.delay >=0&&this.options.queueType=='async')
if(this.options.delay > 0)
setTimeout(function(){
self.finishAnimation();
}, this.options.delay);
else
self.finishAnimation();
},
finishAnimation: function(){
this.options.group.queue.finishPosition();
}};
Queue.prototype={
add: function(obj){
this.queue.push(obj);
},
next: function(){
if(this.is_exec||this.queue.length==0)
return false;
this.is_exec=true;
var obj=this.queue.shift();
obj.startAnimation();
},
finishPosition: function(){
this.is_exec=false;
if(this.queue.length > 0)
this.next();
}};}(jQuery));
(function($, window, document, Math, undefined){
var div=document.createElement("div"),
divStyle=div.style,
suffix="Transform",
testProperties=[
"O" + suffix,
"ms" + suffix,
"Webkit" + suffix,
"Moz" + suffix
],
i=testProperties.length,
supportProperty,
supportMatrixFilter,
supportFloat32Array="Float32Array" in window,
propertyHook,
propertyGet,
rMatrix=/Matrix([^)]*)/,
rAffine=/^\s*matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*(?:,\s*0(?:px)?\s*){2}\)\s*$/,
_transform="transform",
_transformOrigin="transformOrigin",
_translate="translate",
_rotate="rotate",
_scale="scale",
_skew="skew",
_matrix="matrix";
while(i--){
if(testProperties[i] in divStyle){
$.support[_transform]=supportProperty=testProperties[i];
$.support[_transformOrigin]=supportProperty + "Origin";
continue;
}}
if(!supportProperty){
$.support.matrixFilter=supportMatrixFilter=divStyle.filter==="";
}
$.cssNumber[_transform]=$.cssNumber[_transformOrigin]=true;
if(supportProperty&&supportProperty!=_transform){
$.cssProps[_transform]=supportProperty;
$.cssProps[_transformOrigin]=supportProperty + "Origin";
if(supportProperty=="Moz" + suffix){
propertyHook={
get: function(elem, computed){
return (computed ?
$.css(elem, supportProperty).split("px").join(""):
elem.style[supportProperty]
);
},
set: function(elem, value){
elem.style[supportProperty]=/matrix\([^)p]*\)/.test(value) ?
value.replace(/matrix((?:[^,]*,){4})([^,]*),([^)]*)/, _matrix+"$1$2px,$3px"):
value;
}};
}else if(/^1\.[0-5](?:\.|$)/.test($.fn.jquery)){
propertyHook={
get: function(elem, computed){
return (computed ?
$.css(elem, supportProperty.replace(/^ms/, "Ms")):
elem.style[supportProperty]
);
}};}
/* TODO: leverage hardware acceleration of 3d transform in Webkit only
else if(supportProperty=="Webkit" + suffix&&support3dTransform){
propertyHook={
set: function(elem, value){
elem.style[supportProperty] =
value.replace();
}}
}*/
}else if(supportMatrixFilter){
propertyHook={
get: function(elem, computed, asArray){
var elemStyle=(computed&&elem.currentStyle ? elem.currentStyle:elem.style),
matrix, data;
if(elemStyle&&rMatrix.test(elemStyle.filter)){
matrix=RegExp.$1.split(",");
matrix=[
matrix[0].split("=")[1],
matrix[2].split("=")[1],
matrix[1].split("=")[1],
matrix[3].split("=")[1]
];
}else{
matrix=[1,0,0,1];
}
if(! $.cssHooks[_transformOrigin]){
matrix[4]=elemStyle ? parseInt(elemStyle.left, 10)||0:0;
matrix[5]=elemStyle ? parseInt(elemStyle.top, 10)||0:0;
}else{
data=$._data(elem, "transformTranslate", undefined);
matrix[4]=data ? data[0]:0;
matrix[5]=data ? data[1]:0;
}
return asArray ? matrix:_matrix+"(" + matrix + ")";
},
set: function(elem, value, animate){
var elemStyle=elem.style,
currentStyle,
Matrix,
filter,
centerOrigin;
if(!animate){
elemStyle.zoom=1;
}
value=matrix(value);
Matrix=[
"Matrix("+
"M11="+value[0],
"M12="+value[2],
"M21="+value[1],
"M22="+value[3],
"SizingMethod='auto expand'"
].join();
filter=(currentStyle=elem.currentStyle)&¤tStyle.filter||elemStyle.filter||"";
elemStyle.filter=rMatrix.test(filter) ?
filter.replace(rMatrix, Matrix) :
filter + " progid:DXImageTransform.Microsoft." + Matrix + ")";
if(! $.cssHooks[_transformOrigin]){
if((centerOrigin=$.transform.centerOrigin)){
elemStyle[centerOrigin=="margin" ? "marginLeft":"left"]=-(elem.offsetWidth/2) + (elem.clientWidth/2) + "px";
elemStyle[centerOrigin=="margin" ? "marginTop":"top"]=-(elem.offsetHeight/2) + (elem.clientHeight/2) + "px";
}
elemStyle.left=value[4] + "px";
elemStyle.top=value[5] + "px";
}else{
$.cssHooks[_transformOrigin].set(elem, value);
}}
};}
if(propertyHook){
$.cssHooks[_transform]=propertyHook;
}
propertyGet=propertyHook&&propertyHook.get||$.css;
$.fx.step.transform=function(fx){
var elem=fx.elem,
start=fx.start,
end=fx.end,
pos=fx.pos,
transform="",
precision=1E5,
i, startVal, endVal, unit;
if(!start||typeof start==="string"){
if(!start){
start=propertyGet(elem, supportProperty);
}
if(supportMatrixFilter){
elem.style.zoom=1;
}
end=end.split("+=").join(start);
$.extend(fx, interpolationList(start, end));
start=fx.start;
end=fx.end;
}
i=start.length;
while(i--){
startVal=start[i];
endVal=end[i];
unit=+false;
switch(startVal[0]){
case _translate:
unit="px";
case _scale:
unit||(unit="");
transform=startVal[0] + "(" +
Math.round((startVal[1][0] + (endVal[1][0] - startVal[1][0]) * pos) * precision) / precision + unit +","+
Math.round((startVal[1][1] + (endVal[1][1] - startVal[1][1]) * pos) * precision) / precision + unit + ")"+
transform;
break;
case _skew + "X":
case _skew + "Y":
case _rotate:
transform=startVal[0] + "(" +
Math.round((startVal[1] + (endVal[1] - startVal[1]) * pos) * precision) / precision +"rad)"+
transform;
break;
}}
fx.origin&&(transform=fx.origin + transform);
propertyHook&&propertyHook.set ?
propertyHook.set(elem, transform, +true):
elem.style[supportProperty]=transform;
};
function matrix(transform){
transform=transform.split(")");
var
trim=$.trim
, i=-1
, l=transform.length -1
, split, prop, val
, prev=supportFloat32Array ? new Float32Array(6):[]
, curr=supportFloat32Array ? new Float32Array(6):[]
, rslt=supportFloat32Array ? new Float32Array(6):[1,0,0,1,0,0]
;
prev[0]=prev[3]=rslt[0]=rslt[3]=1;
prev[1]=prev[2]=prev[4]=prev[5]=0;
while ( ++i < l){
split=transform[i].split("(");
prop=trim(split[0]);
val=split[1];
curr[0]=curr[3]=1;
curr[1]=curr[2]=curr[4]=curr[5]=0;
switch (prop){
case _translate+"X":
curr[4]=parseInt(val, 10);
break;
case _translate+"Y":
curr[5]=parseInt(val, 10);
break;
case _translate:
val=val.split(",");
curr[4]=parseInt(val[0], 10);
curr[5]=parseInt(val[1]||0, 10);
break;
case _rotate:
val=toRadian(val);
curr[0]=Math.cos(val);
curr[1]=Math.sin(val);
curr[2]=-Math.sin(val);
curr[3]=Math.cos(val);
break;
case _scale+"X":
curr[0]=+val;
break;
case _scale+"Y":
curr[3]=val;
break;
case _scale:
val=val.split(",");
curr[0]=val[0];
curr[3]=val.length>1 ? val[1]:val[0];
break;
case _skew+"X":
curr[2]=Math.tan(toRadian(val));
break;
case _skew+"Y":
curr[1]=Math.tan(toRadian(val));
break;
case _matrix:
val=val.split(",");
curr[0]=val[0];
curr[1]=val[1];
curr[2]=val[2];
curr[3]=val[3];
curr[4]=parseInt(val[4], 10);
curr[5]=parseInt(val[5], 10);
break;
}
rslt[0]=prev[0] * curr[0] + prev[2] * curr[1];
rslt[1]=prev[1] * curr[0] + prev[3] * curr[1];
rslt[2]=prev[0] * curr[2] + prev[2] * curr[3];
rslt[3]=prev[1] * curr[2] + prev[3] * curr[3];
rslt[4]=prev[0] * curr[4] + prev[2] * curr[5] + prev[4];
rslt[5]=prev[1] * curr[4] + prev[3] * curr[5] + prev[5];
prev=[rslt[0],rslt[1],rslt[2],rslt[3],rslt[4],rslt[5]];
}
return rslt;
}
function unmatrix(matrix){
var
scaleX
, scaleY
, skew
, A=matrix[0]
, B=matrix[1]
, C=matrix[2]
, D=matrix[3]
;
if(A * D - B * C){
scaleX=Math.sqrt(A * A + B * B);
A /=scaleX;
B /=scaleX;
skew=A * C + B * D;
C -=A * skew;
D -=B * skew;
scaleY=Math.sqrt(C * C + D * D);
C /=scaleY;
D /=scaleY;
skew /=scaleY;
if(A * D < B * C){
A=-A;
B=-B;
skew=-skew;
scaleX=-scaleX;
}}else{
scaleX=scaleY=skew=0;
}
return [
[_translate, [+matrix[4], +matrix[5]]],
[_rotate, Math.atan2(B, A)],
[_skew + "X", Math.atan(skew)],
[_scale, [scaleX, scaleY]]
];
}
function interpolationList(start, end){
var list={
start: [],
end: []
},
i=-1, l,
currStart, currEnd, currType;
(start=="none"||isAffine(start))&&(start="");
(end=="none"||isAffine(end))&&(end="");
if(start&&end&&!end.indexOf("matrix")&&toArray(start).join()==toArray(end.split(")")[0]).join()){
list.origin=start;
start="";
end=end.slice(end.indexOf(")") +1);
}
if(!start&&!end){ return; }
if(!start||!end||functionList(start)==functionList(end)){
start&&(start=start.split(")"))&&(l=start.length);
end&&(end=end.split(")"))&&(l=end.length);
while ( ++i < l-1){
start[i]&&(currStart=start[i].split("("));
end[i]&&(currEnd=end[i].split("("));
currType=$.trim(( currStart||currEnd)[0]);
append(list.start, parseFunction(currType, currStart ? currStart[1]:0));
append(list.end, parseFunction(currType, currEnd ? currEnd[1]:0));
}}else{
list.start=unmatrix(matrix(start));
list.end=unmatrix(matrix(end))
}
return list;
}
function parseFunction(type, value){
var
defaultValue=+(!type.indexOf(_scale)),
scaleX,
cat=type.replace(/e[XY]/, "e");
switch(type){
case _translate+"Y":
case _scale+"Y":
value=[
defaultValue,
value ?
parseFloat(value):
defaultValue
];
break;
case _translate+"X":
case _translate:
case _scale+"X":
scaleX=1;
case _scale:
value=value ?
(value=value.split(","))&&[
parseFloat(value[0]),
parseFloat(value.length>1 ? value[1]:type==_scale ? scaleX||value[0]:defaultValue+"")
]:
[defaultValue, defaultValue];
break;
case _skew+"X":
case _skew+"Y":
case _rotate:
value=value ? toRadian(value):0;
break;
case _matrix:
return unmatrix(value ? toArray(value):[1,0,0,1,0,0]);
break;
}
return [[ cat, value ]];
}
function isAffine(matrix){
return rAffine.test(matrix);
}
function functionList(transform){
return transform.replace(/(?:\([^)]*\))|\s/g, "");
}
function append(arr1, arr2, value){
while(value=arr2.shift()){
arr1.push(value);
}}
function toRadian(value){
return ~value.indexOf("deg") ?
parseInt(value,10) * (Math.PI * 2 / 360):
~value.indexOf("grad") ?
parseInt(value,10) * (Math.PI/200):
parseFloat(value);
}
function toArray(matrix){
matrix=/([^,]*),([^,]*),([^,]*),([^,]*),([^,p]*)(?:px)?,([^)p]*)(?:px)?/.exec(matrix);
return [matrix[1], matrix[2], matrix[3], matrix[4], matrix[5], matrix[6]];
}
$.transform={
centerOrigin: "margin"
};})(jQuery, window, document, Math);
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(s){var u,l,f,d,t,p,h,g,i,e,b,a,o,c,m,y,n,r,v,x,C="ui-effects-",w=s;function _(t,e,n){var r=g[e.type]||{};return null==t?n||!e.def?null:e.def:(t=r.floor?~~t:parseFloat(t),isNaN(t)?e.def:r.mod?(t+r.mod)%r.mod:t<0?0:r.max")[0],b=u.each,e.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=-1a.mod/2?r+=a.mod:r-o>a.mod/2&&(r-=a.mod)),f[n]=_((o-r)*i+r,e)))}),this[e](f)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),n=e.pop(),r=p(t)._rgba;return p(u.map(e,function(t,e){return(1-n)*r[e]+n*t}))},toRgbaString:function(){var t="rgba(",e=u.map(this._rgba,function(t,e){return null==t?2").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:n.width(),height:n.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return n.wrap(t),n[0]!==o&&!s.contains(n[0],o)||s(o).focus(),t=n.parent(),"static"===n.css("position")?(t.css({position:"relative"}),n.css({position:"relative"})):(s.extend(r,{position:n.css("position"),zIndex:n.css("z-index")}),s.each(["top","left","bottom","right"],function(t,e){r[e]=n.css(e),isNaN(parseInt(r[e],10))&&(r[e]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(e),t.css(r).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!s.contains(t[0],e)||s(e).focus()),t},setTransition:function(r,t,o,a){return a=a||{},s.each(t,function(t,e){var n=r.cssUnit(e);0', {
class: 'tabletolist ' + ((s.rowHeaders) ? 'rh':'nrh'),
id: 'tabletolist' + i
}).insertBefore($(element));
$.each($result, function (index, value){
var $myrow=$('', {
html: (s.rowHeaders) ? '' + index + '':''
}).appendTo($list),
$myrowul=$('').appendTo($myrow);
$.each(value, function (index, value){
$('', {
html: ' ' + value + ''
}).appendTo($myrowul);
});
});
return $list;
}
this.each(function (){
var element=$(this),
responsive_table;
i +=1;
function handle_table(){
if($(window).width() > parseInt(s.maxWidth, 10)){
$(element).show();
if(responsive_table){
$(responsive_table).hide();
}}else{
$(element).hide();
if(responsive_table){
$(responsive_table).show();
}else{
responsive_table=create_responsive_table(element, i);
}}
}
handle_table();
$(window).resize(function (){
handle_table();
});
});
};
$.ReStable=function (options){
$('table').ReStable(options);
};})(jQuery, this, 0);
(function ($){
$.fn.extend({
easyResponsiveTabs: function (options){
var defaults={
type: 'default',
width: 'auto',
fit: true,
closed: false,
activate: function(){}}
var options=$.extend(defaults, options);
var opt=options, jtype=opt.type, jfit=opt.fit, jwidth=opt.width, vtabs='vertical', accord='accordion';
var hash=window.location.hash;
var historyApi = !!(window.history&&history.replaceState);
$(this).bind('tabactivate', function(e, currentTab){
if(typeof options.activate==='function'){
options.activate.call(currentTab, e)
}});
this.each(function (){
var $respTabs=$(this);
var $respTabsList=$respTabs.find('ul.resp-tabs-list');
var respTabsId=$respTabs.attr('id');
$respTabs.find('ul.resp-tabs-list li').addClass('resp-tab-item');
$respTabs.css({
'display': 'block',
'width': jwidth
});
$respTabs.find('.resp-tabs-container > div').addClass('resp-tab-content');
jtab_options();
function jtab_options(){
if(jtype==vtabs){
$respTabs.addClass('resp-vtabs');
}
if(jfit==true){
$respTabs.css({ width: '100%', margin: '0px' });
}
if(jtype==accord){
$respTabs.addClass('resp-easy-accordion');
$respTabs.find('.resp-tabs-list').css('display', 'none');
}}
var $tabItemh2;
$respTabs.find('.resp-tab-content').before("
");
var itemCount=0;
$respTabs.find('.resp-accordion').each(function (){
$tabItemh2=$(this);
var $tabItem=$respTabs.find('.resp-tab-item:eq(' + itemCount + ')');
var $accItem=$respTabs.find('.resp-accordion:eq(' + itemCount + ')');
$accItem.append($tabItem.html());
$accItem.data($tabItem.data());
$tabItemh2.attr('aria-controls', 'tab_item-' + (itemCount));
itemCount++;
});
var count=0,
$tabContent;
$respTabs.find('.resp-tab-item').each(function (){
$tabItem=$(this);
$tabItem.attr('aria-controls', 'tab_item-' + (count));
$tabItem.attr('role', 'tab');
var tabcount=0;
$respTabs.find('.resp-tab-content').each(function (){
$tabContent=$(this);
$tabContent.attr('aria-labelledby', 'tab_item-' + (tabcount));
tabcount++;
});
count++;
});
var tabNum=0;
if(hash!=''){
var matches=hash.match(new RegExp(respTabsId+"([0-9]+)"));
if(matches!==null&&matches.length===2){
tabNum=parseInt(matches[1],10)-1;
if(tabNum > count){
tabNum=0;
}}
}
$($respTabs.find('.resp-tab-item')[tabNum]).addClass('resp-tab-active');
if(options.closed!==true&&!(options.closed==='accordion'&&!$respTabsList.is(':visible'))&&!(options.closed==='tabs'&&$respTabsList.is(':visible'))){
$($respTabs.find('.resp-accordion')[tabNum]).addClass('resp-tab-active');
$($respTabs.find('.resp-tab-content')[tabNum]).addClass('resp-tab-content-active').attr('style', 'display:block');
}else{
$($respTabs.find('.resp-tab-content')[tabNum]).addClass('resp-tab-content-active resp-accordion-closed')
}
$respTabs.find('[role="tab"][aria-controls^="tab_item-"]').each(function (){
var $currentTab=$(this);
$currentTab.click(function (){
var $currentTab=$(this);
var $tabAria=$currentTab.attr('aria-controls');
if($currentTab.hasClass('resp-accordion')&&$currentTab.hasClass('resp-tab-active')){
$respTabs.find('.resp-tab-content-active').slideUp('', function (){ $(this).addClass('resp-accordion-closed'); });
$currentTab.removeClass('resp-tab-active');
return false;
}
if(!$currentTab.hasClass('resp-tab-active')&&$currentTab.hasClass('resp-accordion')){
$respTabs.find('.resp-tab-active').removeClass('resp-tab-active');
$respTabs.find('.resp-tab-content-active').slideUp().removeClass('resp-tab-content-active resp-accordion-closed');
$respTabs.find("[aria-controls=" + $tabAria + "]").addClass('resp-tab-active');
$respTabs.find('.resp-tab-content[aria-labelledby=' + $tabAria + ']').slideDown().addClass('resp-tab-content-active');
}else{
$respTabs.find('.resp-tab-content-temp').remove();
$respTabs.find('.resp-tab-active').removeClass('resp-tab-active');
var $oldtab=$respTabs.find('.resp-tab-content-active').removeAttr('style').removeClass('resp-tab-content-active').removeClass('resp-accordion-closed');
var $oldtabClone=$oldtab.clone(true, true);
$respTabs.find("[aria-controls=" + $tabAria + "]").addClass('resp-tab-active');
var $newtab=$respTabs.find('.resp-tab-content[aria-labelledby=' + $tabAria + ']').addClass('resp-tab-content-active').attr('style', 'display:block');
$newtab.wrap('');
$oldtabClone.insertAfter($newtab).addClass('resp-tab-content-active').addClass('resp-tab-content-temp').css({
position: 'absolute',
top: 0,
left: 0,
width: '100%'
});
$newtab.parent().css({ position:'relative' }).height(Math.max($newtab.outerHeight(), $oldtab.outerHeight()));
$newtab.css({ opacity: 0 });
$newtab.animate({ opacity:1 });
$oldtabClone.animate({ opacity:0 }, function(){
$oldtabClone.remove();
$newtab.unwrap();
});
}
$currentTab.trigger('tabactivate', $currentTab);
if(historyApi){
var currentHash=window.location.hash;
var newHash=respTabsId+(parseInt($tabAria.substring(9),10)+1).toString();
if(currentHash!=""){
var re=new RegExp(respTabsId+"[0-9]+");
if(currentHash.match(re)!=null){
newHash=currentHash.replace(re,newHash);
}else{
newHash=currentHash+"|"+newHash;
}}else{
newHash='#'+newHash;
}
history.replaceState(null,null,newHash);
}});
});
$(window).resize(function (){
$respTabs.find('.resp-accordion-closed').removeAttr('style');
});
});
}});
})(jQuery);
(function(){
var COUNT_FRAMERATE, COUNT_MS_PER_FRAME, DIGIT_FORMAT, DIGIT_HTML, DIGIT_SPEEDBOOST, DURATION, FORMAT_MARK_HTML, FORMAT_PARSER, FRAMERATE, FRAMES_PER_VALUE, MS_PER_FRAME, MutationObserver, Odometer, RIBBON_HTML, TRANSITION_END_EVENTS, TRANSITION_SUPPORT, VALUE_HTML, addClass, createFromHTML, fractionalPart, now, removeClass, requestAnimationFrame, round, transitionCheckStyles, trigger, truncate, wrapJQuery, _jQueryWrapped, _old, _ref, _ref1,
__slice=[].slice;
VALUE_HTML='';
RIBBON_HTML='' + VALUE_HTML + '';
DIGIT_HTML='8' + RIBBON_HTML + '';
FORMAT_MARK_HTML='';
DIGIT_FORMAT='(,ddd).dd';
FORMAT_PARSER=/^\(?([^)]*)\)?(?:(.)(d+))?$/;
FRAMERATE=30;
DURATION=2000;
COUNT_FRAMERATE=20;
FRAMES_PER_VALUE=2;
DIGIT_SPEEDBOOST=.5;
MS_PER_FRAME=1000 / FRAMERATE;
COUNT_MS_PER_FRAME=1000 / COUNT_FRAMERATE;
TRANSITION_END_EVENTS='transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd';
transitionCheckStyles=document.createElement('div').style;
TRANSITION_SUPPORT=(transitionCheckStyles.transition!=null)||(transitionCheckStyles.webkitTransition!=null)||(transitionCheckStyles.mozTransition!=null)||(transitionCheckStyles.oTransition!=null);
requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;
MutationObserver=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;
createFromHTML=function(html){
var el;
el=document.createElement('div');
el.innerHTML=html;
return el.children[0];
};
removeClass=function(el, name){
return el.className=el.className.replace(new RegExp("(^|)" + (name.split(' ').join('|')) + "(|$)", 'gi'), ' ');
};
addClass=function(el, name){
removeClass(el, name);
return el.className +=" " + name;
};
trigger=function(el, name){
var evt;
if(document.createEvent!=null){
evt=document.createEvent('HTMLEvents');
evt.initEvent(name, true, true);
return el.dispatchEvent(evt);
}};
now=function(){
var _ref, _ref1;
return (_ref=(_ref1=window.performance)!=null ? typeof _ref1.now==="function" ? _ref1.now():void 0:void 0)!=null ? _ref:+(new Date);
};
round=function(val, precision){
if(precision==null){
precision=0;
}
if(!precision){
return Math.round(val);
}
val *=Math.pow(10, precision);
val +=0.5;
val=Math.floor(val);
return val /=Math.pow(10, precision);
};
truncate=function(val){
if(val < 0){
return Math.ceil(val);
}else{
return Math.floor(val);
}};
fractionalPart=function(val){
return val - round(val);
};
_jQueryWrapped=false;
(wrapJQuery=function(){
var property, _i, _len, _ref, _results;
if(_jQueryWrapped){
return;
}
if(window.jQuery!=null){
_jQueryWrapped=true;
_ref=['html', 'text'];
_results=[];
for (_i=0, _len=_ref.length; _i < _len; _i++){
property=_ref[_i];
_results.push((function(property){
var old;
old=window.jQuery.fn[property];
return window.jQuery.fn[property]=function(val){
var _ref1;
if((val==null)||(((_ref1=this[0])!=null ? _ref1.odometer:void 0)==null)){
return old.apply(this, arguments);
}
return this[0].odometer.update(val);
};})(property));
}
return _results;
}})();
setTimeout(wrapJQuery, 0);
Odometer=(function(){
function Odometer(options){
var e, k, property, v, _base, _i, _len, _ref, _ref1, _ref2,
_this=this;
this.options=options;
this.el=this.options.el;
if(this.el.odometer!=null){
return this.el.odometer;
}
this.el.odometer=this;
_ref=Odometer.options;
for (k in _ref){
v=_ref[k];
if(this.options[k]==null){
this.options[k]=v;
}}
if((_base=this.options).duration==null){
_base.duration=DURATION;
}
this.MAX_VALUES=((this.options.duration / MS_PER_FRAME) / FRAMES_PER_VALUE) | 0;
this.resetFormat();
this.value=this.cleanValue((_ref1=this.options.value)!=null ? _ref1:'');
this.renderInside();
this.render();
try {
_ref2=['innerHTML', 'innerText', 'textContent'];
for (_i=0, _len=_ref2.length; _i < _len; _i++){
property=_ref2[_i];
if(this.el[property]!=null){
(function(property){
return Object.defineProperty(_this.el, property, {
get: function(){
var _ref3;
if(property==='innerHTML'){
return _this.inside.outerHTML;
}else{
return (_ref3=_this.inside.innerText)!=null ? _ref3:_this.inside.textContent;
}},
set: function(val){
return _this.update(val);
}});
})(property);
}}
} catch (_error){
e=_error;
this.watchForMutations();
}
this;
}
Odometer.prototype.renderInside=function(){
this.inside=document.createElement('div');
this.inside.className='odometer-inside';
this.el.innerHTML='';
return this.el.appendChild(this.inside);
};
Odometer.prototype.watchForMutations=function(){
var e,
_this=this;
if(MutationObserver==null){
return;
}
try {
if(this.observer==null){
this.observer=new MutationObserver(function(mutations){
var newVal;
newVal=_this.el.innerText;
_this.renderInside();
_this.render(_this.value);
return _this.update(newVal);
});
}
this.watchMutations=true;
return this.startWatchingMutations();
} catch (_error){
e=_error;
}};
Odometer.prototype.startWatchingMutations=function(){
if(this.watchMutations){
return this.observer.observe(this.el, {
childList: true
});
}};
Odometer.prototype.stopWatchingMutations=function(){
var _ref;
return (_ref=this.observer)!=null ? _ref.disconnect():void 0;
};
Odometer.prototype.cleanValue=function(val){
var _ref;
if(typeof val==='string'){
val=val.replace((_ref=this.format.radix)!=null ? _ref:'.', '');
val=val.replace(/[.,]/g, '');
val=val.replace('', '.');
val=parseFloat(val, 10)||0;
}
return round(val, this.format.precision);
};
Odometer.prototype.bindTransitionEnd=function(){
var event, renderEnqueued, _i, _len, _ref, _results,
_this=this;
if(this.transitionEndBound){
return;
}
this.transitionEndBound=true;
renderEnqueued=false;
_ref=TRANSITION_END_EVENTS.split(' ');
_results=[];
for (_i=0, _len=_ref.length; _i < _len; _i++){
event=_ref[_i];
_results.push(this.el.addEventListener(event, function(){
if(renderEnqueued){
return true;
}
renderEnqueued=true;
setTimeout(function(){
_this.render();
renderEnqueued=false;
return trigger(_this.el, 'odometerdone');
}, 0);
return true;
}, false));
}
return _results;
};
Odometer.prototype.resetFormat=function(){
var format, fractional, parsed, precision, radix, repeating, _ref, _ref1;
format=(_ref=this.options.format)!=null ? _ref:DIGIT_FORMAT;
format||(format='d');
parsed=FORMAT_PARSER.exec(format);
if(!parsed){
throw new Error("Odometer: Unparsable digit format");
}
_ref1=parsed.slice(1, 4), repeating=_ref1[0], radix=_ref1[1], fractional=_ref1[2];
precision=(fractional!=null ? fractional.length:void 0)||0;
return this.format={
repeating: repeating,
radix: radix,
precision: precision
};};
Odometer.prototype.render=function(value){
var classes, cls, digit, match, newClasses, theme, wholePart, _i, _j, _len, _len1, _ref;
if(value==null){
value=this.value;
}
this.stopWatchingMutations();
this.resetFormat();
this.inside.innerHTML='';
theme=this.options.theme;
classes=this.el.className.split(' ');
newClasses=[];
for (_i=0, _len=classes.length; _i < _len; _i++){
cls=classes[_i];
if(!cls.length){
continue;
}
if(match=/^odometer-theme-(.+)$/.exec(cls)){
theme=match[1];
continue;
}
if(/^odometer(-|$)/.test(cls)){
continue;
}
newClasses.push(cls);
}
newClasses.push('odometer');
if(!TRANSITION_SUPPORT){
newClasses.push('odometer-no-transitions');
}
if(theme){
newClasses.push("odometer-theme-" + theme);
}else{
newClasses.push("odometer-auto-theme");
}
this.el.className=newClasses.join(' ');
this.ribbons={};
this.digits=[];
wholePart = !this.format.precision||!fractionalPart(value)||false;
_ref=value.toString().split('').reverse();
for (_j=0, _len1=_ref.length; _j < _len1; _j++){
digit=_ref[_j];
if(digit==='.'){
wholePart=true;
}
this.addDigit(digit, wholePart);
}
return this.startWatchingMutations();
};
Odometer.prototype.update=function(newValue){
var diff,
_this=this;
newValue=this.cleanValue(newValue);
if(!(diff=newValue - this.value)){
return;
}
removeClass(this.el, 'odometer-animating-up odometer-animating-down odometer-animating');
if(diff > 0){
addClass(this.el, 'odometer-animating-up');
}else{
addClass(this.el, 'odometer-animating-down');
}
this.stopWatchingMutations();
this.animate(newValue);
this.startWatchingMutations();
setTimeout(function(){
_this.el.offsetHeight;
return addClass(_this.el, 'odometer-animating');
}, 0);
return this.value=newValue;
};
Odometer.prototype.renderDigit=function(){
return createFromHTML(DIGIT_HTML);
};
Odometer.prototype.insertDigit=function(digit, before){
if(before!=null){
return this.inside.insertBefore(digit, before);
}else if(!this.inside.children.length){
return this.inside.appendChild(digit);
}else{
return this.inside.insertBefore(digit, this.inside.children[0]);
}};
Odometer.prototype.addSpacer=function(chr, before, extraClasses){
var spacer;
spacer=createFromHTML(FORMAT_MARK_HTML);
spacer.innerHTML=chr;
if(extraClasses){
addClass(spacer, extraClasses);
}
return this.insertDigit(spacer, before);
};
Odometer.prototype.addDigit=function(value, repeating){
var chr, digit, resetted, _ref;
if(repeating==null){
repeating=true;
}
if(value==='-'){
return this.addSpacer(value, null, 'odometer-negation-mark');
}
if(value==='.'){
return this.addSpacer((_ref=this.format.radix)!=null ? _ref:'.', null, 'odometer-radix-mark');
}
if(repeating){
resetted=false;
while (true){
if(!this.format.repeating.length){
if(resetted){
throw new Error("Bad odometer format without digits");
}
this.resetFormat();
resetted=true;
}
chr=this.format.repeating[this.format.repeating.length - 1];
this.format.repeating=this.format.repeating.substring(0, this.format.repeating.length - 1);
if(chr==='d'){
break;
}
this.addSpacer(chr);
}}
digit=this.renderDigit();
digit.querySelector('.odometer-value').innerHTML=value;
this.digits.push(digit);
return this.insertDigit(digit);
};
Odometer.prototype.animate=function(newValue){
if(!TRANSITION_SUPPORT||this.options.animation==='count'){
return this.animateCount(newValue);
}else{
return this.animateSlide(newValue);
}};
Odometer.prototype.animateCount=function(newValue){
var cur, diff, last, start, tick,
_this=this;
if(!(diff=+newValue - this.value)){
return;
}
start=last=now();
cur=this.value;
return (tick=function(){
var delta, dist, fraction;
if((now() - start) > _this.options.duration){
_this.value=newValue;
_this.render();
trigger(_this.el, 'odometerdone');
return;
}
delta=now() - last;
if(delta > COUNT_MS_PER_FRAME){
last=now();
fraction=delta / _this.options.duration;
dist=diff * fraction;
cur +=dist;
_this.render(Math.round(cur));
}
if(requestAnimationFrame!=null){
return requestAnimationFrame(tick);
}else{
return setTimeout(tick, COUNT_MS_PER_FRAME);
}})();
};
Odometer.prototype.getDigitCount=function(){
var i, max, value, values, _i, _len;
values=1 <=arguments.length ? __slice.call(arguments, 0):[];
for (i=_i=0, _len=values.length; _i < _len; i=++_i){
value=values[i];
values[i]=Math.abs(value);
}
max=Math.max.apply(Math, values);
return Math.ceil(Math.log(max + 1) / Math.log(10));
};
Odometer.prototype.getFractionalDigitCount=function(){
var i, parser, parts, value, values, _i, _len;
values=1 <=arguments.length ? __slice.call(arguments, 0):[];
parser=/^\-?\d*\.(\d*?)0*$/;
for (i=_i=0, _len=values.length; _i < _len; i=++_i){
value=values[i];
values[i]=value.toString();
parts=parser.exec(values[i]);
if(parts==null){
values[i]=0;
}else{
values[i]=parts[1].length;
}}
return Math.max.apply(Math, values);
};
Odometer.prototype.resetDigits=function(){
this.digits=[];
this.ribbons=[];
this.inside.innerHTML='';
return this.resetFormat();
};
Odometer.prototype.animateSlide=function(newValue){
var boosted, cur, diff, digitCount, digits, dist, end, fractionalCount, frame, frames, i, incr, j, mark, numEl, oldValue, start, _base, _i, _j, _k, _l, _len, _len1, _len2, _m, _ref, _results;
oldValue=this.value;
fractionalCount=this.getFractionalDigitCount(oldValue, newValue);
if(fractionalCount){
newValue=newValue * Math.pow(10, fractionalCount);
oldValue=oldValue * Math.pow(10, fractionalCount);
}
if(!(diff=newValue - oldValue)){
return;
}
this.bindTransitionEnd();
digitCount=this.getDigitCount(oldValue, newValue);
digits=[];
boosted=0;
for (i=_i=0; 0 <=digitCount ? _i < digitCount:_i > digitCount; i=0 <=digitCount ? ++_i:--_i){
start=truncate(oldValue / Math.pow(10, digitCount - i - 1));
end=truncate(newValue / Math.pow(10, digitCount - i - 1));
dist=end - start;
if(Math.abs(dist) > this.MAX_VALUES){
frames=[];
incr=dist / (this.MAX_VALUES + this.MAX_VALUES * boosted * DIGIT_SPEEDBOOST);
cur=start;
while ((dist > 0&&cur < end)||(dist < 0&&cur > end)){
frames.push(Math.round(cur));
cur +=incr;
}
if(frames[frames.length - 1]!==end){
frames.push(end);
}
boosted++;
}else{
frames=(function(){
_results=[];
for (var _j=start; start <=end ? _j <=end:_j >=end; start <=end ? _j++:_j--){ _results.push(_j); }
return _results;
}).apply(this);
}
for (i=_k=0, _len=frames.length; _k < _len; i=++_k){
frame=frames[i];
frames[i]=Math.abs(frame % 10);
}
digits.push(frames);
}
this.resetDigits();
_ref=digits.reverse();
for (i=_l=0, _len1=_ref.length; _l < _len1; i=++_l){
frames=_ref[i];
if(!this.digits[i]){
this.addDigit(' ', i >=fractionalCount);
}
if((_base=this.ribbons)[i]==null){
_base[i]=this.digits[i].querySelector('.odometer-ribbon-inner');
}
this.ribbons[i].innerHTML='';
if(diff < 0){
frames=frames.reverse();
}
for (j=_m=0, _len2=frames.length; _m < _len2; j=++_m){
frame=frames[j];
numEl=document.createElement('div');
numEl.className='odometer-value';
numEl.innerHTML=frame;
this.ribbons[i].appendChild(numEl);
if(j===frames.length - 1){
addClass(numEl, 'odometer-last-value');
}
if(j===0){
addClass(numEl, 'odometer-first-value');
}}
}
if(start < 0){
this.addDigit('-');
}
mark=this.inside.querySelector('.odometer-radix-mark');
if(mark!=null){
mark.parent.removeChild(mark);
}
if(fractionalCount){
return this.addSpacer(this.format.radix, this.digits[fractionalCount - 1], 'odometer-radix-mark');
}};
return Odometer;
})();
Odometer.options=(_ref=window.odometerOptions)!=null ? _ref:{};
setTimeout(function(){
var k, v, _base, _ref1, _results;
if(window.odometerOptions){
_ref1=window.odometerOptions;
_results=[];
for (k in _ref1){
v=_ref1[k];
_results.push((_base=Odometer.options)[k]!=null ? (_base=Odometer.options)[k]:_base[k]=v);
}
return _results;
}}, 0);
Odometer.init=function(){
var el, elements, _i, _len, _ref1, _results;
if(document.querySelectorAll==null){
return;
}
elements=document.querySelectorAll(Odometer.options.selector||'.odometer');
_results=[];
for (_i=0, _len=elements.length; _i < _len; _i++){
el=elements[_i];
_results.push(el.odometer=new Odometer({
el: el,
value: (_ref1=el.innerText)!=null ? _ref1:el.textContent
}));
}
return _results;
};
if((((_ref1=document.documentElement)!=null ? _ref1.doScroll:void 0)!=null)&&(document.createEventObject!=null)){
_old=document.onreadystatechange;
document.onreadystatechange=function(){
if(document.readyState==='complete'&&Odometer.options.auto!==false){
Odometer.init();
}
return _old!=null ? _old.apply(this, arguments):void 0;
};}else{
document.addEventListener('DOMContentLoaded', function(){
if(Odometer.options.auto!==false){
return Odometer.init();
}}, false);
}
if(typeof define==='function'&&define.amd){
define(['jquery'], function(){
return Odometer;
});
}else if(typeof exports===!'undefined'){
module.exports=Odometer;
}else{
window.Odometer=Odometer;
}}).call(this);
(function ($){
function getScrollY(elem){
return window.pageYOffset||document.documentElement.scrollTop;
}
function Sticky(el, options){
var self=this;
this.el=el;
this.$el=$(el);
this.options={
};
$.extend(this.options, options);
self.init();
}
$.fn.scSticky=function(options){
$(this).each(function(){
return new Sticky(this, options);
});
}
Sticky.prototype={
init: function(){
var self=this;
this.$wrapper=false;
this.$parent=this.getParent();
$(window).scroll(function(){
if(self.useSticky()){
self.wrap();
self.scroll();
}else{
self.unwrap();
}});
$(window).resize(function(){
if(self.useSticky()){
self.wrap();
self.scroll();
}else{
self.unwrap();
}});
},
wrap: function(){
if(!this.$wrapper)
this.$wrapper=this.$el.wrap('').parent();
this.$wrapper.attr('class', this.$el.attr('class')).addClass('sc-sticky-block').css({
padding: 0,
height: this.$el.outerHeight()
});
this.$el.css({
width: this.$wrapper.outerWidth(),
margin: 0
});
},
getParent: function(){
return this.$el.parent();
},
useSticky: function(){
var is_sidebar=true;
if(this.$el.hasClass('sidebar')){
if(this.$wrapper){
if(this.$wrapper.outerHeight() > this.$wrapper.siblings('.panel-center:first').outerHeight())
is_sidebar=false;
}else{
if(this.$el.outerHeight() > this.$el.siblings('.panel-center:first').outerHeight())
is_sidebar=false;
}}
return $(window).width() > 1000&&is_sidebar;
},
unwrap: function(){
if(this.$el.parent().is('.sc-sticky-block')){
this.$el.unwrap();
this.$wrapper=false;
}
this.$el.css({
width: "",
top: "",
bottom: "",
margin: ""
});
},
scroll: function(){
var top_offset=parseInt($('html').css('margin-top'));
var $header=$('#site-header');
if($header.hasClass('fixed')){
top_offset +=$header.outerHeight();
}
var scroll=getScrollY();
var offset=this.$wrapper.offset();
var parent_offset=this.$parent.offset();
var parent_bottom=parent_offset.top + this.$parent.outerHeight() - scroll;
var bottom=$(window).height() - parent_bottom;
if((top_offset + this.$el.outerHeight()) >=parent_bottom){
this.$el.addClass('sticky-fixed').css({
top: "",
bottom: bottom,
left: offset.left
});
return;
}
if((scroll + top_offset) > offset.top){
this.$el.addClass('sticky-fixed').css({
top: top_offset,
bottom: "",
left: offset.left
});
}else{
this.$el.removeClass('sticky-fixed').css({
top: "",
bottom: "",
left: ""
});
}}
};}(jQuery));
(function($){
var ua=navigator.userAgent.toLowerCase(),
platform=navigator.platform.toLowerCase(),
UA=ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null, 'unknown', 0],
mode=UA[1]=='ie'&&document.documentMode;
var Browser={
name: (UA[1]=='version') ? UA[3]:UA[1],
Platform: {
name: ua.match(/ip(?:ad|od|hone)/) ? 'ios':(ua.match(/(?:webos|android)/)||platform.match(/mac|win|linux/)||['other'])[0]
},
};
function getOffset(elem){
if(elem.getBoundingClientRect&&Browser.Platform.name!='ios'){
var bound=elem.getBoundingClientRect(),
html=elem.ownerDocument.documentElement,
htmlScroll=getScroll(html),
elemScrolls=getScrolls(elem),
isFixed=(styleString(elem, 'position')=='fixed');
return {
x: parseInt(bound.left) + elemScrolls.x + ((isFixed) ? 0:htmlScroll.x) - html.clientLeft,
y: parseInt(bound.top) + elemScrolls.y + ((isFixed) ? 0:htmlScroll.y) - html.clientTop
};}
var element=elem, position={x: 0, y: 0};
if(isBody(elem)) return position;
while (element&&!isBody(element)){
position.x +=element.offsetLeft;
position.y +=element.offsetTop;
if(Browser.name=='firefox'){
if(!borderBox(element)){
position.x +=leftBorder(element);
position.y +=topBorder(element);
}
var parent=element.parentNode;
if(parent&&styleString(parent, 'overflow')!='visible'){
position.x +=leftBorder(parent);
position.y +=topBorder(parent);
}}else if(element!=elem&&Browser.name=='safari'){
position.x +=leftBorder(element);
position.y +=topBorder(element);
}
element=element.offsetParent;
}
if(Browser.name=='firefox'&&!borderBox(elem)){
position.x -=leftBorder(elem);
position.y -=topBorder(elem);
}
return position;
};
function getScroll(elem){
return {x: window.pageXOffset||document.documentElement.scrollLeft, y: window.pageYOffset||document.documentElement.scrollTop};};
function getScrolls(elem){
var element=elem.parentNode, position={x: 0, y: 0};
while (element&&!isBody(element)){
position.x +=element.scrollLeft;
position.y +=element.scrollTop;
element=element.parentNode;
}
return position;
};
function styleString(element, style){
return $(element).css(style);
};
function styleNumber(element, style){
return parseInt(styleString(element, style))||0;
};
function borderBox(element){
return styleString(element, '-moz-box-sizing')=='border-box';
};
function topBorder(element){
return styleNumber(element, 'border-top-width');
};
function leftBorder(element){
return styleNumber(element, 'border-left-width');
};
function isBody(element){
return (/^(?:body|html)$/i).test(element.tagName);
};
jQuery('#site-header.animated-header').headerAnimation();
if(Modernizr.touch){
jQuery('body').addClass('lazy-disabled');
}
if(!$('body').hasClass('lazy-disabled')){
if($.support.opacity){
if($(window).width() > 800){
$('.wpb_text_column.wpb_animate_when_almost_visible.wpb_fade').each(function(){
$(this).wrap('').addClass('lazy-loading-item').data('ll-effect', 'fading');
});
$('.sc-list.lazy-loading').each(function(){
$(this).data('ll-item-delay', '200');
$('li', this).addClass('lazy-loading-item').data('ll-effect', 'slide-right');
});
$.lazyLoading();
}}
}
function fix_megamenu_position(){
$('#primary-menu > li.megamenu-enable').each(function(){
var $item=$('> ul', this);
if($item.length==0) return;
var self=$('> ul', this).get(0);
$item.addClass('without-transition');
$item.removeClass('megamenu-masonry-inited').removeClass('megamenu-fullwidth').css({
left: 0,
width: 'auto',
height: 'auto'
});
$(' > li', $item).css({
left: 0,
top: 0
}).each(function(){
var old_width=$(this).data('old-width')||-1;
if(old_width!=-1)
$(this).width(old_width).data('old-width', -1);
});
if($('#primary-navigation .menu-toggle').is(':visible'))
return;
var $container=$item.closest('.container');
var container_width=$container.width();
var container_padding_left=parseInt($container.css('padding-left'));
var container_padding_right=parseInt($container.css('padding-right'));
var megamenu_width=$item.outerWidth();
var parent_width=$item.parent().outerWidth();
if(megamenu_width > container_width){
megamenu_width=container_width;
var new_megamenu_width=container_width - parseInt($item.css('padding-left')) - parseInt($item.css('padding-right'));
$item.addClass('megamenu-fullwidth').width(new_megamenu_width);
var columns=$item.data('megamenu-columns')||4;
var column_width=(new_megamenu_width - (columns - 1) * parseInt($(' > li:first', $item).css('margin-left'))) / columns;
$(' > li', $item).each(function(){
$(this).data('old-width', $(this).width()).width(column_width);
});
}
if(megamenu_width > parent_width)
var left=-(megamenu_width - parent_width) / 2;
else
var left=0;
var container_offset=getOffset($container[0]);
var megamenu_offset=getOffset(self);
if((megamenu_offset.x - container_offset.x - container_padding_left + left) < 0)
left=-(megamenu_offset.x - container_offset.x - container_padding_left);
if((megamenu_offset.x + megamenu_width + left) > (container_offset.x + $container.outerWidth() - container_padding_right)){
left -=(megamenu_offset.x + megamenu_width + left) - (container_offset.x + $container.outerWidth() - container_padding_right);
}
$item.css('left', left).css('left');
if($item.hasClass('megamenu-masonry')){
var positions={};
var max_bottom=0;
$item.width($item.width());
var new_row_height=$('.megamenu-new-row', $item).outerHeight() + parseInt($('.megamenu-new-row', $item).css('margin-bottom'));
$('> li.menu-item', $item).each(function(){
var pos=$(this).position();
if(positions[pos.left]!=null&&positions[pos.left]!=undefined){
var top_position=positions[pos.left];
}else{
var top_position=pos.top;
}
positions[pos.left]=top_position + $(this).outerHeight() + new_row_height;
if(positions[pos.left] > max_bottom)
max_bottom=positions[pos.left];
$(this).css({
left: pos.left,
top: top_position
})
});
$item.height(max_bottom - new_row_height - parseInt($item.css('padding-top')));
$item.addClass('megamenu-masonry-inited');
}
$item.removeClass('without-transition');
});
}
fix_megamenu_position();
$.fn.updateTabs=function(){
jQuery('.sc-tabs', this).each(function(index){
var $tabs=$(this);
$tabs.scaliaPreloader(function(){
$tabs.easyResponsiveTabs({
type: 'default',
width: 'auto',
fit: false,
activate: function(currentTab, e){
var $tab=$(currentTab.target);
var controls=$tab.attr('aria-controls');
$tab.closest('.ui-tabs').find('.sc_tab[aria-labelledby="' + controls + '"]').trigger('tab-update');
}});
});
});
jQuery('.sc-tour', this).each(function(index){
var $tabs=$(this);
$tabs.scaliaPreloader(function(){
$tabs.easyResponsiveTabs({
type: 'vertical',
width: 'auto',
fit: false,
activate: function(currentTab, e){
var $tab=$(currentTab.target);
var controls=$tab.attr('aria-controls');
$tab.closest('.ui-tabs').find('.sc_tab[aria-labelledby="' + controls + '"]').trigger('tab-update');
}});
});
});
}
$(function(){
$('#primary-navigation .submenu-languages').addClass('dl-submenu');
$('#primary-navigation > ul> li.menu-item-language').addClass('menu-item-parent');
$('#primary-navigation').dlmenu({
animationClasses: {
classin:'dl-animate-in',
classout:'dl-animate-out'
},
onLevelClick: function (el, name){
$('html, body').animate({ scrollTop:0 });
}});
$(window).resize(function(){
if($('#primary-navigation .menu-toggle').is(':visible')){
$('#primary-navigation .dl-submenu-disabled').addClass('dl-submenu').removeClass('dl-submenu-disabled');
$('#primary-menu').removeClass('no-responsive');
$('#primary-navigation').addClass('responsive');
fix_megamenu_position();
}else{
$('#primary-navigation .dl-submenu').addClass('dl-submenu-disabled').removeClass('dl-submenu');
$('#primary-menu').addClass('no-responsive');
$('#primary-navigation').removeClass('responsive');
fix_megamenu_position();
$('#primary-menu ul:not(.minicart ul), #primary-menu .minicart').each(function(){
var $item=$(this);
var self=this;
$item.removeClass('invert');
if($item.closest('.megamenu-enable').size()==0){
if($item.offset().left - $('#page').offset().left + $item.outerWidth() > $('#page').width()){
$item.addClass('invert');
}}
});
}});
$('#primary-navigation a').click(function(e){
var $item=$(this);
if($('#primary-menu').hasClass('no-responsive')&&Modernizr.touch&&$item.next('ul').length){
e.preventDefault();
}});
$('.fullwidth-block').each(function(){
var $item=$(this);
$(window).resize(function(){
$item.offset({
left: $('#page').offset().left,
top: $item.offset().top
});
$item.outerWidth($('#page').outerWidth());
$item.trigger('updateTestimonialsCarousel');
$item.trigger('updateClientsCarousel');
$item.trigger('fullwidthUpdate');
});
});
jQuery('.sc-combobox, .widget_archive select, .widget_product_categories select, .widget_layered_nav select, .widget_categories select').each(function(index){
$(this).combobox();
});
jQuery('.sc-checkbox').checkbox();
jQuery('.sc-table-responsive').each(function(index){
$('> table', this).ReStable({
maxWidth: 768,
rowHeaders:$(this).hasClass('row-headers')
});
});
jQuery('.fancybox').each(function(){
$(this).fancybox();
});
jQuery('iframe').not('.sc-video-background iframe').each(function(){
$(this).scaliaPreloader(function(){});
});
jQuery('.sc-video-background').each(function(){
var $videoBG=$(this);
var $videoContainer=$('.sc-video-background-inner', this);
var ratio=$videoBG.data('aspect-ratio') ? $videoBG.data('aspect-ratio'):'16:9';
var regexp=/(\d+):(\d+)/;
ratio=regexp.exec(ratio);
if(!ratio||parseInt(ratio[1])==0||parseInt(ratio[2])==0){
ratio=16/9;
}else{
ratio=parseInt(ratio[1])/parseInt(ratio[2]);
}
$(window).resize(function(){
$videoContainer.removeAttr('style');
if($videoContainer.width() / $videoContainer.height() > ratio){
$videoContainer.css({
height: ($videoContainer.width() / ratio) + 'px',
marginTop: -($videoContainer.width() / ratio - $videoBG.height()) / 2 + 'px'
});
}else{
$videoContainer.css({
width: ($videoContainer.height() * ratio) + 'px',
marginLeft: -($videoContainer.height() * ratio - $videoBG.width()) / 2 + 'px'
});
}});
});
jQuery('.sc-slideshow').each(function(){
var $slideshow=$(this);
$slideshow.scaliaPreloader(function(){});
});
function init_odometer(el){
if(jQuery('.sc-counter-odometer', el).size()==0)
return;
var odometer=jQuery('.sc-counter-odometer', el).get(0);
var od=new Odometer({
el: odometer,
value: $(odometer).text(),
format: '(ddd).ddd'
});
od.update($(odometer).data('to'));
}
window['scalia_init_odometer']=init_odometer;
jQuery('.sc-counter').each(function(index){
if($(window).width() > 800&&jQuery(this).closest('.sc-counter-box').size() > 0&&jQuery(this).closest('.sc-counter-box').hasClass('lazy-loading')&&!jQuery('body').hasClass('lazy-disabled')){
jQuery(this).addClass('lazy-loading-item').data('ll-effect', 'action').data('item-delay', '0').data('ll-action-func', 'scalia_init_odometer');
jQuery('.sc-icon', this).addClass('lazy-loading-item').data('ll-effect', 'fading').data('item-delay', '0');
jQuery('.sc-counter-text', this).addClass('lazy-loading-item').data('ll-effect', 'fading').data('item-delay', '0');
return;
}
init_odometer(this);
});
jQuery('.panel-sidebar-sticky > .sidebar').scSticky();
jQuery('iframe + .map-locker').each(function(){
var $locker=$(this);
$locker.click(function(e){
e.preventDefault();
if($locker.hasClass('disabled')){
$locker.prev('iframe').css({ 'pointer-events':'none' });
}else{
$locker.prev('iframe').css({ 'pointer-events':'auto' });
}
$locker.toggleClass('disabled');
});
});
$('.primary-navigation a, .footer-navigation a, .scroll-top-button, .scroll-to-anchor, .sc-button').each(function(){
var $anhor=$(this);
var link=$anhor.attr('href');
if(!link) return false;
link=link.split('#');
if($('#'+link[1]).length){
$anhor.closest('li').removeClass('menu-item-active current-menu-item');
$(window).scroll(function(){
var correction=$('#site-header').outerHeight() + $('#site-header').position().top;
var target_top=$('#'+link[1]).offset().top - correction;
if(getScrollY() >=target_top&&getScrollY() <=target_top + $('#'+link[1]).outerHeight()){
$anhor.closest('li').addClass('menu-item-active');
}else{
$anhor.closest('li').removeClass('menu-item-active');
}});
$anhor.click(function(e){
e.preventDefault();
var correction=0;
if($('#site-header.animated-header').length){
var shrink=$('#site-header').hasClass('shrink');
$('#site-header').addClass('scroll-counting');
$('#site-header').addClass('fixed shrink');
correction=$('#site-header').outerHeight() + $('#site-header').position().top;
if(!shrink){
$('#site-header').removeClass('fixed shrink');
}
$('#site-header').removeClass('scroll-counting');
}
var target_top=$('#'+link[1]).offset().top - correction + 1;
$('html, body').stop(true, true).animate({scrollTop:target_top}, 1500, 'easeInOutQuint');
});
}
$(window).load(function(){
if(window.location.href==$anhor.attr('href')){
$anhor.click();
}});
});
$(window).scroll(function(){
if(getScrollY() > 0){
$('.scroll-top-button').addClass('visible');
}else{
$('.scroll-top-button').removeClass('visible');
}}).scroll();
function getScrollY(elem){
return window.pageYOffset||document.documentElement.scrollTop;
}
$('a.hidden-email').each(function(){
$(this).attr('href', 'mailto:'+$(this).data('name')+'@'+$(this).data('domain'));
});
$('body').updateTabs();
$(window).trigger('resize');
$(window).load(function(){
$(window).trigger('resize');
});
});
})(jQuery);
(function($){
$.fn.scaliaPreloader=function(callback){
$(this).each(function(){
var $el=$(this);
if(!$el.prev('.preloader').length){
$('').insertBefore($el);
}
$el.data('scaliaPreloader', $('img, iframe', $el).add($el.filter('img, iframe')).length);
if($el.data('scaliaPreloader')==0){
$el.prev('.preloader').remove();
callback();
}
$('img, iframe', $el).add($el.filter('img, iframe')).each(function(){
var $obj=$('
');
if($(this).prop('tagName').toLowerCase()=='iframe'){
$obj=$(this);
}
$obj.attr('src', $(this).attr('src'));
$obj.on('load error', function(){
$el.data('scaliaPreloader', $el.data('scaliaPreloader')-1);
if($el.data('scaliaPreloader')==0){
$el.prev('.preloader').remove();
callback();
}});
});
});
}})(jQuery);
jQuery(document).ready(function(){
jQuery('#dealership-form').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
name: {
message: 'The first name is not valid',
validators: {
notEmpty: {
message: 'Please enter your name'
},
stringLength: {
min: 1,
max: 30,
message: 'The first name must be more than 1 and less than 30 characters long'
},
}},
email: {
validators: {
notEmpty: {
message: 'Please enter a valid email'
},
emailAddress: {
message: 'The email address is not a valid'
}}
},
phone: {
validators: {
digits: {
message: 'The phone number can contain digits only'
},
notEmpty: {
message: 'The phone number is required'
}}
},
message: {
message: 'Please write something for us',
validators: {
notEmpty: {
message: 'Please write something for us'
}}
},
}})
.on('success.form.bv', function(e){
e.preventDefault();
var jQueryform=jQuery(e.target);
var bv=jQueryform.data('bootstrapValidator');
var url='https://script.google.com/macros/s/AKfycbxX_K-72n_SnCvV4W3Wt1AWeTWxX6bOxnUpaVNiM9WD_XU-2ZJV/exec';
var redirectUrl='https://sunright.in/thankyou';
jQuery('#postForm').prepend(jQuery('
').addClass('glyphicon glyphicon-refresh glyphicon-refresh-animate'));
var jqxhr=jQuery.post(url, jQueryform.serialize(), function(data){
console.log("Success! Data: " + data.statusText);
jQuery(location).attr('href',redirectUrl);
})
.fail(function(data){
console.warn("Error! Data: " + data.statusText);
if(navigator.userAgent.search("Safari") >=0&&navigator.userAgent.search("Chrome") < 0){
$(location).attr('href',redirectUrl);
}});
});
});
(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=
d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
(function(C,z,f,r){var q=f(C),n=f(z),b=f.fancybox=function(){b.open.apply(this,arguments)},H=navigator.userAgent.match(/msie/),w=null,s=z.createTouch!==r,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},F=function(a){return p(a)&&0
',image:'',iframe:'",error:'The requested content cannot be loaded.
Please try again later.
',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
c.metadata())):k=c);g=d.href||k.href||(p(c)?c:null);h=d.title!==r?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));p(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":p(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==r&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==r&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},
e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(w),w=null);b.isOpen&&!w&&(w=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),w=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),
b.trigger("onUpdate")),b.update())},hideLoading:function(){n.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('').click(b.cancel).appendTo("body");n.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||
!1,d={x:q.scrollLeft(),y:q.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&C.innerWidth?C.innerWidth:q.width(),d.h=s&&C.innerHeight?C.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&n.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=
e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,
e){e&&(b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&
(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=
!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady");
if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=
this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,
(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=
b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();
e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='
"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,
v=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,p=l(y[1]+y[3]),r=l(y[0]+y[2]),z,A,t,D,B,G,C,E,w;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=l(k.outerWidth(!0)-k.width());z=l(k.outerHeight(!0)-k.height());A=p+y;t=r+z;D=F(c)?(a.w-A)*l(c)/100:c;B=F(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(w=h.content,h.autoHeight&&1===w.data("ready"))try{w[0].contentWindow.document.location&&(g.width(D).height(9999),G=w.contents().find("body"),q&&G.css("overflow-x",
"hidden"),B=G.height())}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=l(D);j=l(B);E=D/B;m=l(F(m)?l(m,"w")-A:m);n=l(F(n)?l(n,"w")-A:n);u=l(F(u)?l(u,"h")-t:u);v=l(F(v)?l(v,"h")-t:v);G=n;C=v;h.fitToView&&(n=Math.min(a.w-A,n),v=Math.min(a.h-t,v));A=a.w-p;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/E)),j>v&&(j=v,c=l(j*E)),c
A||p>r)&&(c>m&&j>u)&&!(19n&&(c=n,j=l(c/E)),g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height();else c=Math.max(m,Math.min(c,c-(a-A))),j=Math.max(u,Math.min(j,j-(p-r)));q&&("auto"===s&&jA||p>r)&&c>m&&j>u;c=h.aspectRatio?cu&&j ').appendTo("body");
this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasClass("fancybox-overlay")&&(b.isActive?b.close():d.close())});this.overlay.css(a.css).show()},
close:function(){f(".fancybox-overlay").remove();q.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");H?(b=Math.max(z.documentElement.offsetWidth,z.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>q.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,b){f(".fancybox-overlay").stop(!0,
!0);this.overlay||(this.margin=n.height()>q.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=z.all&&!z.querySelector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",l(this.margin)+b.scrollbarWidth));this.open(a)},onUpdate:function(){this.fixed||
this.update()},afterClose:function(a){this.overlay&&!b.isActive&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f(''+e+"
");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),
H&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+
'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):n.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};n.ready(function(){f.scrollbarWidth===r&&(f.scrollbarWidth=function(){var a=f('').appendTo("body"),b=a.children(),
b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===r){var a=f.support,d=f('').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
(function($){
$('a.fancy').fancybox();
$('a.fancy-gallery').fancybox({
helpers:{
title: {
type: 'over'
}},
wrapCSS: 'slideinfo',
beforeLoad: function(){
var clone=$(this.element).children('.slide-info').clone();
if(clone.length){
this.title=clone.html();
}}
});
$('.portfolio-item a.vimeo, .portfolio-item a.youtube, .blog article a.youtube, .blog article a.vimeo').fancybox({
type: 'iframe'
});
$('.portfolio-item a.self_video').fancybox({
width: '80%',
height: '80%',
autoSize: false,
content: '',
afterShow: function(){
if(this.element.closest('.portfolio-item').find('.videoblock').html()!=''){
this.inner.html(this.element.closest('.portfolio-item').find('.videoblock').html());
}else{
jwplayer('fancybox-video').setup({
file: this.href,
width: '100%',
height: '100%',
autostart: true
});
}},
beforeClose: function(){
if(this.element.next('.videoblock').html()==''){
jwplayer('fancybox-video').remove();
}}
});
})(jQuery);
(function($){
$(function(){
$('body').updateAccordions();
});
$.fn.updateAccordions=function(){
$('.sc_accordion', this).each(function (index){
var $accordion=$(this);
$accordion.scaliaPreloader(function(){
var $tabs,
interval=$accordion.attr("data-interval"),
active_tab = !isNaN($accordion.data('active-tab'))&&parseInt($accordion.data('active-tab')) > 0 ? parseInt($accordion.data('active-tab')) - 1:false,
collapsible=$accordion.data('collapsible')==='yes';
$tabs=$accordion.find('.sc_accordion_wrapper').accordion({
header:"> div > .sc_accordion_header",
autoHeight:false,
heightStyle:"content",
active:active_tab,
collapsible: collapsible,
navigation:true,
activate: function(event, ui){
if(ui.newPanel.size() > 0){
ui.newPanel.trigger('accordion-update');
}},
beforeActivate: function(event, ui){
if(ui.newPanel.size() > 0){
$("html, body").animate({ scrollTop: ui.newPanel.closest('.sc_accordion').offset().top - 200 }, 300);
}}
});
});
});
}})(jQuery);
!function(d,l){"use strict";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)):(index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length,index=jQuery(this).parent().hasClass("wpb_next_slide")?length<=index+1?0:index+1:index-1<0?length-1:index-1,$tabs.tabs("option","active",index))})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,active_tab,collapsible,$this=jQuery(this);$this.attr("data-interval"),collapsible=!1===(active_tab=!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).on("click",function(e){e&&e.preventDefault&&e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0);getColumnsCount(jQuery(this));jQuery(this).hasClass("columns_count_1")&&900;var carousel_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousel_li.css({"margin-right":carousel_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).on("resize",function(){screen_size!=(screen_size=getSizeName())&&window.setTimeout(function(){location.reload()},20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1')}),vc_initVideoBackgrounds(),callSkrollInit=!1,window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSize,skrollrStart,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),($parallaxElement=$("").addClass("vc_parallax-inner").appendTo($(this))).height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),(youtubeId=vcExtractYoutubeId(parallaxImage))?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrStart=-(skrollrSize-100),$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: 0%;")}),callSkrollInit&&window.skrollr&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();function getSizeName(){var screen_w=jQuery(window).width();return 1170').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px"):(iframeH=(iframeW=containerW)*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px"),iframeW+="px",iframeH+="px",$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.on("click",function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.on("mouseleave",function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),perspective=4*$this.width()+"px";$this.css("perspective",perspective)})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=backHeight